action-validator: Schema-Check Actions and Workflows
action-validator checks that a workflow file or an action.yml conforms to the official GitHub Actions JSON schema, without needing a GitHub connection.
If you author composite or JavaScript actions, action-validator catches a malformed action.yml before consumers hit it. It is a small, dependency-free binary useful in pre-commit and PR gates.
What it does
action-validator loads the appropriate schema for the file (workflow vs action metadata), validates the YAML against it, and additionally checks glob patterns in path filters. It reports the JSON-schema path of any violation.
Common usage
action-validator .github/workflows/ci.yml
action-validator action.yml
action-validator -v .github/workflows/*.yml # verbose
find .github/workflows -name '*.yml' -print0 \
| xargs -0 -n1 action-validatorOptions
| Flag | What it does |
|---|---|
| <file> | One or more workflow or action.yml files to validate |
| -v, --verbose | Print detailed validation output |
| --rootdir <dir> | Root directory for resolving relative paths |
| --version | Print the version |
In CI
Pair action-validator with actionlint: action-validator confirms the file matches the schema, actionlint adds expression and shell checks. It is a good pre-commit hook because it is fast and offline.
Common errors in CI
A failure looks like Validation failed: ... Additional properties are not allowed ('jobs' was unexpected) or 'runs-on' is a required property, each with the JSON path. command not found: action-validator means it is not installed. Because it is schema-only, it will not catch a valid-but-wrong ${{ }} expression; use actionlint for that.