Skip to content

Commit c5297a2

Browse files
authored
Merge pull request #3919 from github/henrymercer/workflow-concurrency
CI: Automatically cancel non-generated workflows
2 parents 164c32a + 8ffeae7 commit c5297a2

8 files changed

Lines changed: 33 additions & 0 deletions

.github/workflows/check-expected-release-files.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
# by other workflows.
1010
types: [opened, synchronize, reopened, ready_for_review]
1111

12+
concurrency:
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
1216
defaults:
1317
run:
1418
shell: bash

.github/workflows/codescanning-config-cli.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
- cron: '0 5 * * *'
2525
workflow_dispatch:
2626

27+
concurrency:
28+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
29+
group: ${{ github.workflow }}-${{ github.ref }}
30+
2731
defaults:
2832
run:
2933
shell: bash

.github/workflows/debug-artifacts-failure-safe.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- cron: '0 5 * * *'
2121
workflow_dispatch:
2222

23+
concurrency:
24+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
2327
defaults:
2428
run:
2529
shell: bash

.github/workflows/debug-artifacts-safe.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- cron: '0 5 * * *'
2020
workflow_dispatch:
2121

22+
concurrency:
23+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
2226
defaults:
2327
run:
2428
shell: bash

.github/workflows/pr-checks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
types: [checks_requested]
1111
workflow_dispatch:
1212

13+
concurrency:
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
1317
defaults:
1418
run:
1519
shell: bash

.github/workflows/python312-windows.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
- cron: '0 0 * * 1'
1515
workflow_dispatch:
1616

17+
concurrency:
18+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
1721
defaults:
1822
run:
1923
shell: bash

.github/workflows/query-filters.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
- cron: '0 5 * * *'
1818
workflow_dispatch:
1919

20+
concurrency:
21+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
2024
defaults:
2125
run:
2226
shell: bash

.github/workflows/test-codeql-bundle-all.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
schedule:
1919
- cron: '0 5 * * *'
2020
workflow_dispatch:
21+
22+
concurrency:
23+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
2126
defaults:
2227
run:
2328
shell: bash

0 commit comments

Comments
 (0)