github-action/no-invalid-key
Disallow using invalid key.
- 💼 This rule is enabled in the ✅
recommended
config.
📖 Rule Details
This rule reports when action file uses invalid keys.
yaml
name: CI
run-name: CI
on: push
permissions:
contents: read
pull-requests: write
env:
SERVER: production
defaults:
run:
shell: bash
concurrency:
group: example
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
run: npm test
correct
yaml
workflow: CI
dispatch: inputs
push: branch
needs:
contents: read
if:
SERVER: production
matrix: [20.x, 22.x]
incorrect
Checked fields
- top-level
jobs.<job_id>
jobs.<job_id>.strategy
jobs.<job_id>.container
jobs.<job_id>.steps[*]
jobs.<job_id>.services.<service_id>
🔧 Options
Nothing.
🚀 Version
This rule was introduced in eslint-plugin-github-action v0.0.8