Skip to content

Commit 9483d6e

Browse files
committed
ci: cancel pr jobs after new push
github.head_ref is only defined for pull_request event, so only those will be grouped, the rest will fallback to unique run_id, so we neither cancel them or serialize.
1 parent 11c020f commit 9483d6e

6 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ on:
2929
- 'README.md'
3030
- 'RELEASE_NOTES'
3131

32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
34+
cancel-in-progress: true
35+
3236
jobs:
3337
mingw:
3438
runs-on: ubuntu-24.04

.github/workflows/cleanup_caches.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
workflows: [build]
66
types: [completed]
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
812
jobs:
913
cache:
1014
runs-on: ubuntu-latest

.github/workflows/comment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
workflows: [build]
66
types: [completed]
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
812
jobs:
913
pr_comment:
1014
if: github.event.workflow_run.event == 'pull_request' &&

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
paths:
1414
- 'DOCS/**'
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
1620
jobs:
1721
check-docs:
1822
runs-on: ubuntu-latest

.github/workflows/fuzz.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- 'Copyright'
1313
- 'README.md'
1414
- 'RELEASE_NOTES'
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
1518
permissions: {}
1619
jobs:
1720
Fuzzing:

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010
branches: [master]
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
commit-msg:
1418
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)