Skip to content

ci: cancel in-progress CodeQL runs on new PR commits#1273

Merged
chrjohn merged 1 commit into
masterfrom
copilot/codeql-analysis-cancel-duplicate-jobs
Jul 1, 2026
Merged

ci: cancel in-progress CodeQL runs on new PR commits#1273
chrjohn merged 1 commit into
masterfrom
copilot/codeql-analysis-cancel-duplicate-jobs

Conversation

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

codeql-analysis.yml lacked the concurrency cancellation that maven.yml already has, causing stale CodeQL runs to continue wasting resources when a new commit is pushed to an open PR.

Changes

  • codeql-analysis.yml: added concurrency block identical to the one in maven.yml
    • PR builds are grouped by PR number → new push cancels the in-progress run
    • Push-to-master builds use run_id as the group key → never cancelled
concurrency:
  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

@chrjohn chrjohn added this to the QFJ 3.0.2 milestone Jul 1, 2026
@chrjohn chrjohn marked this pull request as ready for review July 1, 2026 14:22
@chrjohn chrjohn merged commit 2e11831 into master Jul 1, 2026
3 of 12 checks passed
@chrjohn chrjohn deleted the copilot/codeql-analysis-cancel-duplicate-jobs branch July 1, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants