GitHub Actions Workflow Validator

Paste a workflow file from .github/workflows to check its structure. Every finding names the line, explains what GitHub expects and shows how to write it.

Loading tool…

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

  1. Paste the workflow (a .yml file from .github/workflows) or open the file.
  2. Read the verdict above the editors: triggers, jobs and the number of findings.
  3. Go through the findings, sorted by line. Errors prevent the workflow from running.
  4. 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?
It means that the structure is correct. Whether the workflow succeeds depends on things the validator cannot see: that the actions and versions exist, that secrets are set, that the runner has the tools, and what the expressions evaluate to at run time.
Why should I pin actions to a commit SHA?
Tags and branches are mutable: the owner of an action, or an attacker who takes over the repository, can move 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?
With POSIX cron syntax in quotes, five fields: minute, hour, day of month, month and day of week, for example 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?
On a step, 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.

Related tools