Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

GitHub Actions Concurrency vs. Job-Level Cancellation: What’s the Difference?

GitHub Actions concurrency can govern whole workflow runs or individual jobs. Here’s how groups, pending queues, cancel-in-progress, and manual run cancellation differ.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GitHub Actions concurrency is an automatic YAML policy that limits or cancels workflow runs or jobs sharing a concurrency group. It is not a separate “job-level cancellation” feature: job-level concurrency is the same policy applied to one job. Manual cancellation is different—it lets an authorized user stop a particular workflow run from the Actions interface.

What the three controls actually do

Control Where it is set or used What it affects How it starts
Workflow-level concurrency At the top level of the workflow YAML Workflow runs that share a concurrency group Automatically when matching work enters the group
Job-level concurrency Under jobs.<job_id>.concurrency Jobs that share a concurrency group Automatically when matching work enters the group
Manual run cancellation Actions interface, on a selected run The selected workflow run and its jobs or steps An authorized user chooses to cancel that run

Both YAML scopes use a group and can specify cancellation behavior. The group determines which work interacts; cancel-in-progress determines whether new matching work also stops work already running. Manual cancellation does not depend on a concurrency group. GitHub documents the concurrency syntax and scopes; its manual cancellation guide covers stopping an individual run.

As an Amazon Associate I earn from qualifying purchases.

How concurrency groups and cancellation behave

A concurrency group is a label shared by the workflow runs or jobs you want to constrain. It can be a fixed string or an expression. Use a key that represents the shared resource or work—for example, a workflow and branch for CI, or a deployment target for deployments.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

By default, a group can have one running item and one pending item. When another matching item arrives, it cancels and replaces the existing pending item; that default does not, by itself, cancel the running item. Setting cancel-in-progress: true also cancels the running item. The option applies within the matching group, not to unrelated workflows or jobs.

GitHub’s workflow syntax reference says group names are case-insensitive. It also documents queue: max, which allows up to 100 pending items rather than replacing older pending work. GitHub does not guarantee dispatch order: ordering is based on when an item began waiting, and the order is not guaranteed. queue: max cannot be combined with cancel-in-progress: true. See GitHub’s workflow syntax reference for these queue and group rules.

Choose the scope and group for the work you need to control

Use workflow-level concurrency for competing runs

Put concurrency at the workflow’s top level when matching workflow runs should be constrained as a whole. To keep runs separate by workflow and branch, GitHub’s example uses ${{ github.workflow }}-${{ github.ref }}. Including workflow identity helps avoid unintentionally grouping different workflows that share a ref.

For a workflow triggered by pull requests as well as other events, github.head_ref is only defined for pull-request events. GitHub’s documented fallback is ${{ github.head_ref || github.run_id }}.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use job-level concurrency for a particular job

Put concurrency under jobs.<job_id> when the restriction should apply to that job rather than to the workflow run as a whole. For example, a job that uses a shared resource can have a group representing that resource, while other jobs in the workflow remain outside that group. Whether matching work waits, replaces pending work, or cancels running work still depends on the group and its concurrency settings.

Use a deployment target as the group when deployments share a destination

If the goal is to prevent simultaneous deployments to the same destination, use a group that identifies that shared target. Decide whether a new deployment should replace pending work, cancel the current deployment, or wait in a queue. Concurrency controls serialization; GitHub environments separately provide deployment protections such as approvals, branch restrictions, and access to secrets. GitHub’s deployment documentation explains concurrency and environments.

How to cancel one workflow run manually

  1. Open the repository on GitHub and select the Actions tab.
  2. Select the workflow run you want to stop.
  3. Choose Cancel workflow for that queued or in-progress run.

GitHub requires write access to cancel a run. This is an operator action against the selected run; it does not establish a reusable rule for future runs. Read GitHub’s manual cancellation instructions.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What happens while a run or job is being canceled

Cancellation is not necessarily immediate. GitHub re-evaluates conditions on running jobs. A job whose condition remains true can continue—for example, a job configured with if: always(). A job without an explicit condition is treated as if it had if: success(). GitHub also re-evaluates conditions on unfinished steps.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For steps selected for cancellation, the runner first sends an interrupt to the entry process: SIGINT on Linux and macOS, or Ctrl-C on Windows. If it has not exited after 7,500 milliseconds, the runner sends SIGTERM on Linux and macOS, or Ctrl-Break on Windows. After a further 2,500 milliseconds, it kills the process tree if necessary. GitHub documents a five-minute cancellation timeout before the server forcibly terminates jobs and steps still marked for cancellation. These timings and signals are described in GitHub’s workflow cancellation reference.

Because an always() cleanup job or step can continue, cancellation should not be treated as rollback. If a deployment or another step has already changed an external system, the cancellation documentation does not promise to undo that change.

Which option should you use?

  • Prevent duplicate or stale workflow runs: use workflow-level concurrency with a group that identifies the workflow and relevant ref; enable cancel-in-progress only if stopping the older running run is acceptable.
  • Limit contention for one job or shared resource: use job-level concurrency and a group that identifies that resource.
  • Let pending matching work accumulate: consider queue: max, keeping its 100-pending-item limit and incompatibility with cancel-in-progress: true in mind.
  • Stop one specific run immediately by operator choice: use the Actions interface’s manual cancellation control.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.