github-action/prefer-cancel-in-progress
Prefer setting concurrency cancel-in-progress to true.
📖 Rule Details
This rule reports when a concurrency block does not set cancel-in-progress: true.
The rule checks both workflow-level and job-level concurrency.
yaml
name: CI
concurrency:
group: ci-main
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: pnpm testcorrect
yaml
name: CI
concurrency:
group: ci-mainyaml
name: CI
jobs:
test:
runs-on: ubuntu-latest
concurrency:
group: test-main
cancel-in-progress: false
steps:
- run: pnpm testincorrect
🔧 Options
Nothing.
🚀 Version
This rule was introduced in eslint-plugin-github-action v0.3.0