perf(ci): cancel superseded main runs

Keep pull request cancellation unchanged while grouping main pushes by ref so
newer commits stop obsolete CI runs. Preserve SHA-scoped release runs.

Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
Wes
2026-08-07 12:02:08 -06:00
co-authored by Carl
parent 1922d49cb2
commit 053d3b0e57
+4 -2
View File
@@ -5,8 +5,10 @@ on:
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Keep only the newest run for each PR and for main. Release runs are never
# cancelled: a newer release push must not evict an older release gate.
group: ci-${{ github.workflow }}-${{ (github.event_name == 'pull_request' || github.ref == 'refs/heads/main') && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}
env:
CARGO_TERM_COLOR: always