actionlint checks GitHub Actions workflows, action manifests and the scripts inside them.
Try the playground · Install · Browse the rules
actionlint checkactionlint discovers workflows and action manifests in a Git repository and follows local action and reusable-workflow dependencies.
| What you wrote | What actionlint checks |
|---|---|
${{ matrix.platform }} |
Whether platform exists and has the expected type. |
needs: [build] |
Whether the job exists and whether the dependencies form a cycle. |
uses: ./actions/deploy |
Required inputs, declared outputs and composite steps. |
| A reusable-workflow call | Inputs, secrets, outputs and permission constraints. |
run: ... |
ShellCheck findings for shell and Ruff findings for Python. |
${{ github.event.issue.title }} inside a script |
Whether untrusted text reaches executable script text. |
runs-on, trigger filters, or a schedule |
Runner compatibility, glob syntax, cron expressions and time zones. |
Save this workflow as .github/workflows/ci.yml and run actionlint check --output-format=pretty .github/workflows/ci.yml:
name: CI
on: push
permissions: {}
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- run: echo "Testing"error[expression-reference] unknown-property
property "platform" is not defined in matrix
--> .github/workflows/ci.yml:9:18
|
9 | runs-on: ${{ matrix.platform }}
| ^^^^^^^^^^^^^^^
= config: lint.rules.correctness.expression-referenceBuild an action's inputs or env: entries with ${{ insert }}:
with:
${{ insert }}: >-
${{ fromJSON('{"fetch-depth": 0, "persist-credentials": false}') }}actionlint checks the inserted names and values.
GitHub accepts comments inside JSON, unquoted keys, trailing text after the closing brace and mixed-case function names. actionlint understands them. The actions-rs CI workflow uses all of them:
runs-on: ${{ matrix.os }}
strategy:
matrix: |-
${{
FrOmJsOn(
tOjSoN(
fRoMjSoN(
'{
// load-bearing newline
os:
[
''ubuntu-latest'',
"windows-latest"
,''macos-latest'',
],
octal: [010], hex: ["0xFF"]
/*,array_hole: [,]*/ , empty_string: [""]
,null_value: [null],undefined_value: ["undefined"],
not_a_number: ["NaN"], positive_infinity: ["Infinity"]
,constructor: ["new Date()"],
}
this trailing sentence is apparently fine'
)
)
)
}}actionlint resolves the matrix and reports the loose JSON as information. In the same workflow it catches if: ${{ format('{0}', false) }}. That expression yields the string "false", and the job runs.
The expression behavior guide explains why '017' == 17 and fromJSON('017') == 15 can both be true.
Initialize a project once:
actionlint config init --toml
actionlint checkconfig init installs the ShellCheck and Ruff WebAssembly plugins and pins their versions in .github/actionlint.toml. See script-linter configuration.
actionlint fix
actionlint fix --applyThe first command previews safe edits as JSON. The second applies them. Add --include-suggested to review edits that need a judgment call.
Run the language server over standard input and output:
actionlint lspThe server checks unsaved buffers and offers quick fixes, suppressions and expression completion. See editor support. The browser playground runs the same server.
actionlint fetches remote action and reusable-workflow metadata to check inputs, outputs, secrets and permissions. Warm the cache before working offline:
actionlint cache warm .github/workflows
actionlint check --offline .github/workflowsAdd rule settings to .github/actionlint.toml:
#:schema https://cdn.jsdelivr.net/gh/kjanat/actionlint@2/actionlint.schema.json
[lint.rules]
preset = "recommended"
security = "error"
suspicious.mixed-type-comparisons = "error"
conventions.job-timeout = { level = "error", options = { max-minutes = 30 } }
[[overrides]]
includes = [".github/workflows/legacy.yml"]
lint.rules.correctness.deprecated-commands = "off"Tombi reads the schema directive for validation and completion.
actionlint rules
actionlint rules matrix
actionlint check --strictYAML, JSON and JSONC also work. extends shares local or HTTPS configuration files.
Inspect the effective settings and their sources:
actionlint config show --origin
actionlint config validate
actionlint doctorMigrate an existing configuration:
actionlint config migrate
actionlint config migrate --writeSee configuration, the rule reference and the migration guide.
WebAssembly plugins can analyze documents, check embedded languages or provide runner inventory.
actionlint plugin search shellcheck
actionlint plugin list
actionlint plugin sync
actionlint plugin updatesync restores the pinned versions. update resolves newer releases. The plugin guide has SDKs and examples.
actionlint check --json
actionlint check --output-format=jsonl
actionlint check --output-format=github
actionlint check --output-format=sarif --output-file=actionlint.sarifSee result formats before you build a report consumer.
The GitHub Action adds annotations, job summaries, SARIF output and pull-request reviews. The integration guide covers pre-commit, Git hooks, reviewdog and editors.
See the installation guide. Try the latest preview from master:
npx https://pkg.pr.new/kjanat/actionlint/@kjanat/actionlint@masterOr build from source with Go 1.27 or newer:
go install ./cmd/actionlintAdd Go's installation directory to PATH and keep git available. See usage and the v2 migration notes.
Read the contributing guide, then use the project tools through mise:
mise exec -- runner install
mise exec -- go build ./cmd/actionlint
mise exec -- run test
mise exec -- run fmtactionlint uses the MIT license. The identity artwork is by Kaj Kowalski and licensed under CC BY 4.0.
