ci/concurrency-cancel
PR workflows cancel superseded runs
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.0.0-20261011205826-ecb4e9b3ffd4 |
| Selected by | fleetlint-recommended@0.1.0 |
Requirement
Workflows triggered by pull requests declare concurrency: {group: ..., cancel-in-progress: true}.
Why
Every push to a PR otherwise queues another full run behind the obsolete one.
Applies when
workflows().exists(w, "pull_request" in triggers(w))Check
For each item in:
workflows().filter(w, "pull_request" in triggers(w))yaml(item) != null && has(yaml(item).concurrency) && yaml(item).concurrency["cancel-in-progress"] != falseFix
Add a concurrency block keyed on the workflow and ref with cancel-in-progress: true.
Agent instruction: Add concurrency: { group: ${{ github.workflow }}-${{ github.ref }}, cancel-in-progress: true } at the top level of the workflow.
Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.