fix(ci): cancel superseded pull request runs

The concurrency groups included the commit SHA, so every run was in a
group of its own and cancel-in-progress never cancelled a run that a
newer push had replaced. Group runs by pull request or ref instead.
Only pull request runs are cancelled, so every push to main still gets
fully checked and published.
This commit is contained in:
alex authored and Alex Zenla committed 2026-09-26 20:52:15 -07:00
1 parent cf1ea65414
commit 2e643d8081
4 files changed
+12 -8

No files matched your search

+3 -2
View File
@@ -12,8 +12,9 @@ permissions:
contents: read # Needed to checkout the repository.
concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.sha }}"
cancel-in-progress: true
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
# Only cancel superseded pull request runs, so every push to main is fully checked.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
artifacts: