ci: add workflow-level concurrency to ci.yml and codeql.yml (#1242)

cancel-in-progress: false queues new runs so the single mac mini
runner doesn't fight itself when pushes stack during rebases or
cross-PR contention. Existing e2e-api.yml already has this pattern.

Fixes: 19 queued runs on single self-hosted runner (02:55 UTC snapshot)

Co-authored-by: Molecule AI Fullstack (floater) <fullstack-floater@agents.moleculesai.app>
This commit is contained in:
molecule-ai[bot] 2026-04-21 03:07:31 +00:00 committed by GitHub
parent 883cb7ebc3
commit e6d48e6590
2 changed files with 8 additions and 6 deletions

View File

@ -6,12 +6,7 @@ on:
pull_request:
branches: [main, staging]
# Cancel in-progress CI runs when a new commit arrives on the same ref.
# This prevents multiple stale runs from queuing behind each other and
# monopolising the self-hosted macOS arm64 runner.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
e4a62e1 (ci: add workflow-level concurrency to ci.yml and codeql.yml)
jobs:
# Detect which paths changed so downstream jobs can skip when only

View File

@ -23,6 +23,13 @@ on:
# Weekly run picks up findings in code that hasn't been touched.
- cron: '30 1 * * 0'
# Workflow-level concurrency: only one CodeQL run per branch/PR at a time.
# `cancel-in-progress: false` queues new runs — the 45-min analysis is the
# longest CI occupant and fights the single mac mini runner the hardest.
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: false
permissions:
actions: read
contents: read