diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce6c707..ee916ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,14 @@ on: pull_request: branches: [ main, cc ] +# Cancel superseded runs: when new commits are pushed to the same PR/branch, +# in-progress runs for that ref are cancelled instead of running to completion +# on stale code. Pushes to main are exempt (cancel-in-progress is false there) +# so every commit landed on main keeps full, uninterrupted CI history. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + permissions: contents: read