About the GitHub Actions Validator
GitHub only tells you that a workflow is broken after you push it, and then often with a single line such as Invalid workflow file. This validator parses the YAML and checks the structure against the workflow syntax: the top-level keys, on with its event names and filters, and for every job runs-on and steps — or uses for a job that calls a reusable workflow. Every step must have exactly one of uses and run; shell and working-directory need run, with needs uses. Misspelled keys such as runs_on get a suggestion.
Relations are checked too. needs must name jobs that exist and must not form a cycle. Job and step ids must start with a letter or _ and contain only letters, digits, - and _. uses must have the form owner/repo@ref, ./local/path or docker://image. Cron expressions in on.schedule need five valid fields. permissions must use known scopes with read, write or none. timeout-minutes must be a number, and every ${{ needs its }}.
Security findings are warnings and notes, not errors: an action that follows a branch (@main) runs whatever is pushed there, a third-party action pinned to a tag can be moved by its owner, and only a full commit SHA is immutable. A workflow without permissions gives the GITHUB_TOKEN the defaults of the repository. The validator does not contact GitHub: it cannot know whether an action, a version, a runner label or a secret exists, and it does not evaluate expressions. The key on is read as the string it is meant to be; generic YAML 1.1 tools turn it into the boolean true, which is why some YAML linters complain about workflows.
How to use it
- Paste the workflow (a .yml file from .github/workflows) or open the file.
- Read the verdict above the editors: triggers, jobs and the number of findings.
- Go through the findings, sorted by line. Errors prevent the workflow from running.
- Fix the file and watch the list update. “Sample with errors” shows typical mistakes.
Frequently asked questions
Does a valid result mean that the workflow will run?
Why should I pin actions to a commit SHA?
v1 to different code, and your workflow runs it with access to your secrets. A full 40-character commit SHA cannot be changed. Write the version as a comment behind it so that tools like Dependabot can update it.How do I write a schedule?
cron: "30 5 * * 1-5" for 05:30 UTC on weekdays. Shortcuts such as @daily are not supported, times are in UTC, and the shortest interval is five minutes.What is the difference between uses on a step and on a job?
uses runs an action (actions/checkout@v4). On a job, uses calls a reusable workflow file (owner/repo/.github/workflows/build.yml@v1); such a job has no runs-on and no steps, and receives inputs through with and secrets.