Action — actionlint
Validates GitHub Actions workflow files with actionlint.
Usage
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: KevinDeBenedetti/github-workflows/.github/actions/actionlint@v0.57.0 # x-release-please-version
with:
paths: .github/workflows/Inputs
| Input | Type | Default | Description |
|---|---|---|---|
paths | string | .github/workflows/ | Space-separated workflow files, directories and globs to validate |
flags | string | '' | Extra flags passed to actionlint, split like a shell command line (e.g. -ignore 'SC2086') |
Steps
- Install the pinned
actionlint(1.7.11) into$RUNNER_TEMP/actionlintwithinstall-tool - Collect the
.yml/.yamlfiles ofpathsand splitflags(actionlint.sh) - Run
actionlint [flags] <files>
Notes
When a
pathsentry is a directory, all.ymland.yamlfiles within it are collected recursively. A glob (.github/workflows/ci-*.yml) is expanded. An entry that matches nothing fails the step, so a typo cannot skip the check.flagshonours shell quoting:flags: -ignore 'SC2086'passes one pattern,-ignore "a b"one pattern with a space. An unmatched quote fails the step. Before this, quotes reached actionlint as part of the pattern, which then matched nothing.Needs
python3on the runner to splitflags, asinstall-tooldoes.actionlint is downloaded fresh each run; no system-wide install is required.
actionlint does not know the
ubuntu-26.04andubuntu-26.04-armrunner labels yet, and fails a literalruns-on: ubuntu-26.04as an unknown label. List them in the repository's.github/actionlint.yaml, which actionlint reads by itself, as this repository does:yamlself-hosted-runner: labels: - ubuntu-26.04 - ubuntu-26.04-arm