Skip to content

Commit 1a65220

Browse files
authored
Cancel GHA workflows when another commit is pushed (#3658)
1 parent ba87e87 commit 1a65220

10 files changed

+44
-1
lines changed

.github/workflows/backend.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [master]
88

9+
concurrency:
10+
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }}
12+
913
permissions: # added using https://github.com/step-security/secure-workflows
1014
contents: read
1115

.github/workflows/codeql.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ on:
44
push:
55
branches: [master]
66
pull_request:
7-
# The branches below must be a subset of the branches above
87
branches: [master]
98
schedule:
109
- cron: "21 8 * * 3"
1110

11+
concurrency:
12+
cancel-in-progress: true
13+
group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }}
14+
1215
permissions: # added using https://github.com/step-security/secure-workflows
1316
contents: read
1417

.github/workflows/commit_message_check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
branches: [master]
66

7+
concurrency:
8+
cancel-in-progress: true
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
10+
711
permissions: # added using https://github.com/step-security/secure-workflows
812
contents: read
913
pull-requests: write

.github/workflows/database.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: database
22

33
on:
4+
push:
5+
branches: [master]
46
pull_request:
57
branches: [master]
68

9+
concurrency:
10+
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }}
12+
713
permissions: # added using https://github.com/step-security/secure-workflows
814
contents: read
915

.github/workflows/dependency-review.yml

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

12+
concurrency:
13+
cancel-in-progress: true
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
15+
1216
permissions:
1317
contents: read
1418

.github/workflows/deploy_qa.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches: [master]
66

7+
concurrency:
8+
cancel-in-progress: true
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
711
permissions:
812
contents: read
913

.github/workflows/frontend.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [master]
88

9+
concurrency:
10+
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }}
12+
913
permissions: # added using https://github.com/step-security/secure-workflows
1014
contents: read
1115

.github/workflows/maintenance.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: maintenance
22

33
on:
4+
push:
5+
branches: [master]
46
pull_request:
57
branches: [master]
68

9+
concurrency:
10+
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }}
12+
713
permissions: # added using https://github.com/step-security/secure-workflows
814
contents: read
915

.github/workflows/pages.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
push:
88
branches: [master]
99

10+
concurrency:
11+
cancel-in-progress: true
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
1014
permissions: # added using https://github.com/step-security/secure-workflows
1115
contents: write
1216

.github/workflows/python.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [master]
88

9+
concurrency:
10+
cancel-in-progress: true
11+
group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }}
12+
913
permissions: # added using https://github.com/step-security/secure-workflows
1014
contents: read
1115

0 commit comments

Comments
 (0)