ci: unify concurrency group to avoid double CI runs on release branches#698
Open
hanhan761 wants to merge 1 commit into
Open
ci: unify concurrency group to avoid double CI runs on release branches#698hanhan761 wants to merge 1 commit into
hanhan761 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the GitHub Actions workflow trigger configuration to narrow when CI runs on pushes.
Changes:
- Removed
release/**from theon.push.branchesfilter so pushes to release branches no longer trigger this workflow.
Comment on lines
25
to
27
| push: | ||
| branches: | ||
| - main |
ci: unify concurrency group to avoid double CI runs on release branches When a forward-merge PR (release/X.Y → main) is open, each push to the release branch triggered CI twice — once via the push event and once via pull_request — with different concurrency groups that never cancelled each other. Change the concurrency group from `github.head_ref || github.run_id` to `github.head_ref || github.ref_name`. Both the push to release/X.Y and the PR from release/X.Y → main now resolve to the same group (release/X.Y) and cancel each other. Closes microsoft#666 @
4d21291 to
7effb5c
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.
@
Summary
When a forward-merge PR (
release/X.Y → main) is open, each push to the release branch triggered CI twice — once viapushand once viapull_request. The two runs had different concurrency groups and never cancelled each other, doubling Actions minutes.Fix: Change the concurrency group from
github.head_ref || github.run_idtogithub.head_ref || github.ref_name.Both the push to
release/X.Yand the PR fromrelease/X.Y → mainnow resolve to the same group (release/X.Y) and cancel each other.release/**stays in the push trigger, preserving CI coverage for direct release-branch pushes.Before
After
Issue
Fixes #666
@