Skip to content

ci: unify concurrency group to avoid double CI runs on release branches#698

Open
hanhan761 wants to merge 1 commit into
microsoft:mainfrom
hanhan761:ci-666-remove-release-push-trigger
Open

ci: unify concurrency group to avoid double CI runs on release branches#698
hanhan761 wants to merge 1 commit into
microsoft:mainfrom
hanhan761:ci-666-remove-release-push-trigger

Conversation

@hanhan761

@hanhan761 hanhan761 commented May 29, 2026

Copy link
Copy Markdown

@

Summary

When a forward-merge PR (release/X.Y → main) is open, each push to the release branch triggered CI twice — once via push and once via pull_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_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. release/** stays in the push trigger, preserving CI coverage for direct release-branch pushes.

Before

concurrency:
    group: ${% raw %}{{ github.head_ref || github.run_id }}{% endraw %}

After

concurrency:
    group: ${% raw %}{{ github.head_ref || github.ref_name }}{% endraw %}

Issue

Fixes #666
@

Copilot AI review requested due to automatic review settings May 29, 2026 13:28
@hanhan761 hanhan761 requested a review from a team as a code owner May 29, 2026 13:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the on.push.branches filter 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
@
@hanhan761 hanhan761 force-pushed the ci-666-remove-release-push-trigger branch from 4d21291 to 7effb5c Compare May 29, 2026 13:31
@hanhan761 hanhan761 changed the title ci: remove release/** from push trigger to avoid double CI runs ci: unify concurrency group to avoid double CI runs on release branches May 29, 2026
@tnaum-ms tnaum-ms added the in-triage-queue We've seen your input and will triage it label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-triage-queue We've seen your input and will triage it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: double-run on release/** branches when forward-merge PR is open

3 participants