-
Notifications
You must be signed in to change notification settings - Fork 22
Setup CI nightly build #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
name: Keycloak Client Nightly Release | ||
|
||
on: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Scheduled nightly workflows | ||
|
||
on: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
run-ci: | ||
name: Run nightly workflows | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-client' | ||
|
||
strategy: | ||
matrix: | ||
workflow: | ||
- ci.yml | ||
- release-nightly.yml | ||
|
||
steps: | ||
- run: gh workflow run -R ${{ github.repository }} ${{ matrix.workflow }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this 'not schedule' condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've copy/pasted it from some other places :-) Like for example https://github.com/keycloak/keycloak/blob/main/.github/workflows/schedule-nightly.yml#L11 or https://github.com/keycloak/keycloak-quickstarts/blob/latest/.github/workflows/schedule.yml#L15 .
If I understand correctly, the aim of this condition is this (please correct me if I am wrong):
The action will executed every night in the
keycloak/keycloak-client
repositoryThe action will NOT be executed periodically in the forked repositories like
mposolda/keycloak-client
.Someone in the forked repository still has a way to run this action manually in his repository if he wants to.
I believe this condition is exactly used for that. On the other hand, running the "release nightly" in the forked repository will always fail (as some secrets are needed in GH to push the stuff into maven etc). It makes sense that someone has a way to run CI action in his repository, but "release nightly" probably does not makes sense. So maybe I can just remove the "not schedule" condition and keep just
if: github.repository == 'keycloak/keycloak-client'
. WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably fine like this, was just wondering about the reason behind it. LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Ok, let's keep it like that. Might be useful as it will allow to trigger more CI jobs at the same time like we're doing for the keycloak/keycloak (for keycloak-client, we will probably also have something for #87 )