ci: cancel superseded pull-request runs - #26
Merged
Conversation
epodivilov
marked this pull request as ready for review
July 21, 2026 22:04
Add a concurrency group keyed on workflow and ref. Cancellation is enabled only for pull_request events, where a new push makes the in-flight run's result obsolete and waiting for it just delays the check. Runs on push to main are never cancelled, so the branch always ends up with a fully verified state.
epodivilov
force-pushed
the
ci/concurrency-group
branch
from
July 21, 2026 22:07
60bf859 to
fbc4924
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a
concurrencyblock toci.yml, keyed on${{ github.workflow }}-${{ github.ref }}.cancel-in-progressis an expression rather than a baretrue:pull_request, a series of pushes to an open PR currently starts parallel runs, and the superseded ones grind to completion. Their result is already obsolete, so finishing them only pushes the green check later. Cancelling them shortens feedback time.push: main, cancellation is not wanted. Aborting a run halfway would leave the branch without a verified state.release.ymlis deliberately left alone: it isworkflow_dispatch-triggered, and a cancellation between the tag push and the GitHub Release creation would leave a half-published release.The workflow was parsed with PyYAML and with the
yamlCLI in strict mode before committing.