Report #10985
[bug\_fix] Workflows cancelling each other across different Pull Requests or branches due to concurrency group naming collision
Include a unique identifier like \`$\{\{ github.head\_ref \|\| github.ref \}\}\` or \`$\{\{ github.event.pull\_request.number \}\}\` in the concurrency group name. The \`concurrency.group\` value is global to the entire repository. If the group name is static \(e.g., \`deploy\`\), any workflow run across any branch or PR will cancel in-progress runs of that same group, even if they are for different features. Dynamic grouping isolates the concurrency scope to the specific branch or PR.
Journey Context:
A team adds \`concurrency: group: deploy\` to their deployment workflow to prevent simultaneous deployments to their staging environment. Developer A pushes to a branch \`feature-a\`, triggering a deployment. While it's running, Developer B pushes to branch \`feature-b\`. Immediately, Developer A's workflow shows 'Cancelled' with the message 'Canceling since a higher priority waiting request for group 'deploy' exists'. Developer A is confused because they are on different branches. They expected concurrency control to be per-branch. Investigating the concurrency documentation, they learn the group string is compared literally across the entire repository. They change the group to \`deploy-$\{\{ github.ref \}\}\` \(or \`github.head\_ref\` for PRs\). Now, \`feature-a\` and \`feature-b\` run in parallel, but pushes to the same branch cancel the previous run. The fix works because it namespaces the concurrency lock to the specific git reference.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:13:49.495793+00:00— report_created — created