From 67fee184a555fa108437bf03c21e965fec0992e6 Mon Sep 17 00:00:00 2001 From: Leo Lara Date: Mon, 22 Jun 2026 10:22:42 +0700 Subject: [PATCH] ci: supersede in-progress runs on push to main The concurrency group fell back to github.run_id when github.head_ref was empty, which is every push to main. A unique run_id per run meant no two runs ever shared a group, so cancel-in-progress never fired on main. A burst of merges then stacked CI and Docker runs that all ran to completion, saturating the shared (especially macOS) runner pool and pushing wall-clock into the hours through queue contention. Fall back to github.ref instead, so every push to a branch shares one group and the newer run supersedes the older one. Pull requests are unchanged: head_ref is still set there and keys the group by source branch. --- .github/workflows/ci.yml | 2 +- .github/workflows/docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b1420e4a..9b6784c6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2080695b4..cee569fe8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,7 +11,7 @@ permissions: packages: write concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: