Skip to content

Commit 0076078

Browse files
committed
improvement(ci): run the CodeQL cron weekly and cancel superseded scans
1 parent cb8338c commit 0076078

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ on:
4141
# Safety net behind the push trigger, and the thing that keeps the
4242
# default-branch alert view fresh when main is quiet. Only fires once this
4343
# file is on the default branch — schedule events ignore other branches.
44-
- cron: '17 8 * * *'
44+
# Weekly, not daily: main is already fully scanned on every merge.
45+
- cron: '17 8 * * 1'
4546
workflow_dispatch:
4647

47-
# Scheduled main scans must run to completion — only PR pushes supersede.
48+
# Only the newest analysis of a ref feeds the alert view, so superseded runs are
49+
# safe to drop. A merge to main can cancel the weekly scan; the push supersedes it.
4850
concurrency:
4951
group: codeql-${{ github.ref }}
50-
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
52+
cancel-in-progress: true
5153

5254
permissions:
5355
contents: read

0 commit comments

Comments
 (0)