Skip to content

Commit cecbde3

Browse files
committed
ci: cancel in-flight runs when a new push lands on the same PR
Add a concurrency block keyed on workflow + ref so a fresh push to a pull request automatically cancels any still-running prior run for that ref. cancel-in-progress is gated on the pull_request event, so master / release / check_suite triggers are left alone (they should never cancel themselves).
1 parent 034db2e commit cecbde3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
permissions:
1414
contents: read # to fetch code (actions/checkout)
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
19+
1620
env:
1721
DEBIAN_FRONTEND: noninteractive
1822

0 commit comments

Comments
 (0)