What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose a concurrency group name that gives the same value only to runs that are allowed to affect one another. For ordinary branch CI, a practical starting point is ci-${{ github.workflow }}-${{ github.ref }}: it separates workflows and refs, so a newer run can supersede older work for the same workflow and branch without interfering with another workflow or branch.
Start by deciding what should share a group
A concurrency group is a string or expression set at the workflow level or on an individual job. Its value identifies the runs or jobs that GitHub coordinates together; the group name does not itself decide whether work waits, gets replaced, or is canceled.
Ask: if two runs produce exactly the same group value, should one wait for, replace, or cancel the other? If not, add the missing identity dimension—often the workflow, branch/ref, or deployment target.
- Same workflow, same branch: include workflow identity and the ref.
- One deployment target shared by workflows: use a stable key for that target, such as an environment name, and intentionally leave out workflow identity so those workflows share the lock.
- Independent workflows: include workflow identity to prevent their runs from sharing a group.
Choose the dimensions that make the key unique enough
Branch CI: separate workflows and refs
For CI where a newer run should replace older work from the same workflow and ref, use:
#1 Best Overall
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
GitHub documents the combination of github.workflow and github.ref as a pattern for limiting cancellation to the same workflow and ref. The workflow component matters because group names can coordinate runs across workflows in the same repository.
Shared deployment target: name the resource
If different workflows deploy to the same environment and must not deploy there simultaneously, give them the same stable group value for that target—for example, a value derived from the environment name. This deliberately coordinates across workflows. Add a workflow-specific component only if those workflows should no longer share the deployment lock.
Rank #2
Pull requests and other event types: provide a fallback
Some event-specific values are not present for every trigger. If a pull-request head ref may be absent, GitHub documents a fallback pattern such as:
group: ${{ github.head_ref || github.run_id }}
The fallback avoids unrelated runs collapsing into one shared group when the head-ref value is unavailable. The expression syntax for a group can use the github, inputs, and vars contexts.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
Keep the group name distinct from the queue policy
The group defines which work is coordinated. The concurrency policy defines what GitHub does when work in that group is already running or waiting.
| Policy | What happens | When it fits |
|---|---|---|
Default queue behavior (queue: single) |
One item runs and at most one item waits. A newer waiting item replaces the existing pending item. | Use when only the newest pending result matters, as with many CI checks. |
cancel-in-progress: true |
A new item also cancels the currently running item in the group; the default pending-item replacement behavior still applies. | Use when older running work should stop as soon as newer work arrives. |
queue: max |
Allows up to 100 pending jobs or workflow runs. | Use when waiting deployments or other queued work must be retained instead of replacing the previous pending item. |
GitHub does not allow queue: max together with cancel-in-progress: true; that combination causes workflow validation to fail. With queue: max, FIFO order is based on when a run or job started waiting, not when it was dispatched, and dispatch order is not guaranteed. Do not rely on it for strict trigger-order execution.
Rank #4
Avoid subtle group-name collisions
Group matching is case-insensitive, so prod and Prod are the same group. Capitalization cannot make otherwise identical group keys independent. Before adopting a naming scheme, check the group value for each relevant combination of workflow, event, ref, and target; if two values match but those runs should not affect one another, add a distinguishing component.
Inspect active groups when behavior is unexpected
GitHub provides REST API endpoints for listing active concurrency groups in a repository. The endpoint can be used without authentication for public resources; access to a private repository requires appropriate Actions read permission. Inspecting active group names can help identify accidental sharing or a key that is not separating runs as intended.
Recommended Free Tools
Best Value
Official reference
See GitHub’s Workflow syntax for GitHub Actions for the current concurrency syntax, expression context rules, group matching, and queue behavior.
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.




