-
Notifications
You must be signed in to change notification settings - Fork 411
Prevent unnecessary CI workflow runs #2196
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
Prevent unnecessary CI workflow runs #2196
Conversation
This master branch is just an alias to the main branch for legacy reasons, so there's no need to run workflows on both branches.
At times, PRs can go through multiple pushes in a short amount of time, spawning a workflow run for each. Most of the time, there's no need to let the previous jobs running if the code itself has changed (e.g., via a force push), and we'd benefit from having those slots be used by other PRs/branches instead.
7db7232
to
d63006d
Compare
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.
No idea what this does, but we'll see if it works once we merge it. YOLO.
Heh, feel free to browse through https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions to confirm the behavior here. |
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.
Oh nice! Didn't know there was a cancel-in-progress config.
push: | ||
branches-ignore: | ||
- master | ||
pull_request: | ||
branches-ignore: | ||
- master |
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.
Do we mean main
here? Also does this mean merges to main won't kick off CI anymore?
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.
No, we just want to prevent any workflows from running on the master
branch. Whether it resulted from a merged PR into main
(which is then replayed on master
) or from a PR attempting to merge into master
(all PRs should go to main
) shouldn't matter.
No description provided.