Skip to content

Commit 614a7e3

Browse files
authored
build: Cancel in-progress jobs for CodeQL action (#5921)
1 parent c64e41a commit 614a7e3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [master]
2020
schedule:
2121
- cron: '40 3 * * 0'
2222

23+
# Cancel in progress workflows on pull_requests.
24+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27+
cancel-in-progress: true
28+
2329
jobs:
2430
analyze:
2531
name: Analyze

0 commit comments

Comments
 (0)