Skip to content

Commit 7a99dbc

Browse files
ci: cancel superseded pull-request runs (#64)
Adds a concurrency group so a new push (or branch update) to a PR cancels the still-running CI for the previous head. Default-branch runs always finish. Cuts queue time on the org's shared Actions runners. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 82ae137 commit 7a99dbc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
branches: [main]
66
pull_request:
77

8+
concurrency:
9+
# Cancel superseded runs on pull requests (each push / branch update restarts CI);
10+
# runs on the default branch always finish.
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
13+
814
permissions:
915
contents: read
1016

0 commit comments

Comments
 (0)