Skip to content

Commit df143c9

Browse files
authored
Merge pull request DeusData#2548 from DeusData/ci/main-push-concurrency
ci: analyse and score only the newest main commit
2 parents 1696ef5 + 3379c86 commit df143c9

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎.github/workflows/codeql.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ on:
99
permissions:
1010
contents: read
1111

12+
# One analysis per pull request and one per pushed branch. A newer push to main
13+
# cancels the analysis of an older main commit; only the newest commit's
14+
# results matter for main, and a merge-heavy day otherwise queues one 40-100
15+
# minute analysis per merge ahead of every pull request run.
1216
concurrency:
13-
group: codeql-${{ github.ref }}-${{ github.event.pull_request.number || github.sha }}
17+
group: codeql-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
1418
cancel-in-progress: true
1519

1620
jobs:

‎.github/workflows/scorecard.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
permissions: read-all
1010

11+
# Only the newest main commit is scored: a newer push (or the weekly run)
12+
# cancels a pending or running score of an older commit.
13+
concurrency:
14+
group: scorecard-${{ github.ref }}
15+
cancel-in-progress: true
16+
1117
jobs:
1218
scorecard:
1319
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)