{
  "id": 11511044,
  "title": "Adding Concurrency with `cancel-in-progress` to GitHub Actions CI to Cut Build Minutes",
  "url": "https://urgent.news/2026/10/02/adding-concurrency-with-cancel-in-progress-to-github-actions-ci-to",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-02T19:39:42.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/zaerohell/adding-concurrency-with-cancel-in-progress-to-github-actions-ci-to-cut-build-minutes-3ba0"
  },
  "original_language": "en",
  "account": "GitHub Actions workflows can be triggered excessively when multiple commits are pushed to a branch quickly, leading to wasted minutes on the CI pipeline. The workflow file `.github/workflows/ci-e2e.yml` was updated to include a `concurrency` block with `cancel-in-progress: true`. This ensures that a new run is automatically canceled if a previous run with the same identifier is queued. The `group` field in the concurrency block is constructed by combining the workflow name and the branch reference, ensuring a unique identifier for each branch. This prevents overlapping runs on the same branch, cutting the build minutes by approximately 30% on active pull requests. The implementation is straightforward and eliminates the need for custom scripting or manual guards, as GitHub Actions handles the cancellation logic natively. The updated workflow shows a single active run in the Actions UI, with previously queued runs marked as \"Cancelled.\"",
  "summary": "Adding Concurrency with cancel-in-progress to GitHub Actions CI to Cut Build Minutes TL;DR: I added a concurrency block with cancel-in-progress: true to the ci-e2e.yml workflow, preventing overlapping runs on the same branch. This change immediately reduced wasted Action minutes by ~30 % on active PRs. The Problem Our CI pipeline ( .github/workflows/ci-e2e.yml ) was triggered on every push to a…",
  "key_points": [
    "GitHub Actions workflows updated with concurrency block",
    "cancel-in-progress: true ensures canceled previous runs",
    "Build minutes cut by ~30% on active pull requests"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 2,
    "also_reported_by": [
      {
        "outlet": "Dev.to",
        "title": "Adding Concurrency Cancellation to GitHub Actions Workflows to Save CI Minutes",
        "url": "https://urgent.news/2026/10/02/adding-concurrency-cancellation-to-github-actions-workflows-to-save",
        "published": "2026-10-02T19:40:41.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}