The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →GitHub Actions concurrency groups limit overlapping work that shares a group key. By default, a group has one active run or job and one pending member; a new arrival replaces the pending member. Use queue: max to retain a waiting line, or cancel-in-progress: true when newer work should stop active work. These settings solve different problems and cannot be combined.
What are GitHub Actions concurrency group names?
A concurrency group name is the key GitHub Actions uses to decide which jobs or workflow runs should coordinate. You can set concurrency at the workflow level or on an individual job. The group can be a fixed string or an expression using the documented contexts github, inputs, vars, needs, strategy, and matrix. Group matching is case-insensitive, as GitHub Docs explains.
As an Amazon Associate I earn from qualifying purchases.
Choose the key to match the work that must not overlap. A fixed group such as production-deploy makes deployments targeting that group coordinate. Adding workflow and ref values separates work by workflow and branch or ref. The right scope depends on whether jobs from different workflows or branches are meant to affect one another.
Replace stale CI runs on the same workflow and ref
For CI where only the latest run for a workflow/ref combination matters, use:
#1 Best Overall
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
This lets a new member cancel active work sharing that group. Use this pattern only when stopping superseded work is acceptable.
Handle pull requests and other triggers
github.head_ref is specific to pull request events. If a workflow also runs for events without a head ref, GitHub documents this fallback pattern:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Adapt the expression to the workflow’s actual triggers. Falling back to the run ID avoids putting non-pull-request events into an undefined or shared group.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #2
Why did my workflow run get canceled?
A canceled run does not necessarily mean cancel-in-progress stopped an active run. With default concurrency behavior, a group can have one active member and one pending member. When another member arrives, GitHub cancels and replaces the previous pending member, even if cancel-in-progress is not enabled.
- Pending run canceled: A newer member entered the same group and displaced the existing pending member under the default behavior.
- Active run canceled: Check whether the group configuration sets
cancel-in-progress: trueor an expression that evaluates to true for that run. - Unexpected workflow canceled: Look for another workflow that builds the same group name. Within a repository, workflows using the same group can affect each other.
When diagnosing a missing pending run, inspect the group expressions across workflows, not just the YAML file for the run you expected to remain queued.
How do I queue GitHub Actions runs?
By default, concurrency does not preserve an unlimited line of pending work: only one member is pending, and later arrivals replace it. To retain multiple pending jobs or workflow runs in a group, configure queue: max:
Rank #3
concurrency:
group: production-deploy
queue: max
GitHub allows up to 100 pending jobs or workflow runs per concurrency group with this setting. Arrivals beyond that limit are rejected or canceled; it is not an unlimited queue. See GitHub’s Actions limits.
Do not add cancel-in-progress: true to a group with queue: max; GitHub documents that combination as invalid. Decide whether the workflow should keep a line of waiting work or cancel active work when newer work arrives—the two behaviors are mutually exclusive.
Does cancel-in-progress cancel the current run?
It can cancel currently running work in the same concurrency group when a new member arrives. Set cancel-in-progress: true for unconditional cancellation, or use an expression when cancellation should depend on context. It applies to matching active work, not every run in the repository.
Rank #4
Without this setting, default concurrency can still cancel the older pending member when replacing it with a newer one. Distinguish the pending slot from the active run when interpreting cancellation notices.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Are concurrency groups shared across workflows?
Yes. Within a repository, separate workflows that use the same group name can interact; group names are not automatically isolated by workflow. Include ${{ github.workflow }} when each workflow should have its own group, and include a ref such as ${{ github.ref }} when separate branches or refs should also have distinct groups. Conversely, omit those distinctions only when sharing the group is intentional.
The documented behavior establishes coordination within a repository. It does not establish a strict deployment lock shared across separate repositories or across an organization, so do not rely on a concurrency group as that broader guarantee.
Does GitHub Actions run queued work in dispatch order?
No strict dispatch-time order is guaranteed. GitHub describes queued members in relation to when they began waiting on the group, but notes that actual start times can vary: “Since the actual start time of a job or run may vary, ordering is not guaranteed.” See GitHub Docs. Do not use concurrency queues when correctness depends on a guaranteed order of dispatch or completion.
How can I inspect active concurrency groups?
GitHub documents a REST API endpoint for listing concurrency groups for a repository. For private repositories, a fine-grained personal access token needs Actions repository read permission. The endpoint is List the concurrency groups for a repository. Use this alongside review of workflow YAML to identify group-name collisions and determine what work currently shares a group.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




