From 0af149f1c4e503af6776c5c9e9106e1d6ddbd4b4 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Thu, 6 Aug 2026 05:15:55 +0200 Subject: [PATCH] ci: give main a run-unique concurrency group Every push to main shared one ref-keyed concurrency group with cancellation on, so a merge landing while the previous merge's checks were still running evicted them. A cancelled check is not a failed check, so main settled green over verification that never completed. Disabling cancellation would not be sufficient on a shared key: a group holds one running plus one pending run, and a third push cancels the pending one. Part of devantler-tech/monorepo#2690 --- .github/workflows/ci.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e27cb9c..315e835 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,8 +8,16 @@ on: workflow_dispatch: concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true + # On main each run is that commit's verification record, so it gets a run-unique + # group and nothing there queues behind or evicts anything else. Disabling + # cancellation alone would not be enough: a concurrency group holds one running + # plus one pending run, and a third push cancels the pending one, so a second + # push's checks would still be lost. A cancelled check is not a failed check, so + # main would report green over verification that never completed. + # + # Pull requests keep the ref-keyed group, so superseded runs there still cancel. + group: "${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}" + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} permissions: {}