How to Validate a GitHub Actions Workflow
Use the GitHub Actions Validator to catch structural errors and common mistakes in your workflow YAML before pushing.
Tool Used
GitHub Actions Validator
Paste your workflow YAML
Copy the contents of your .github/workflows/*.yml file and paste it into the textarea. The validator runs automatically as you type.
Check top-level keys
The validator confirms the required top-level keys are present: name, on, and jobs. Missing any of these will prevent GitHub Actions from processing the workflow.
Review job definitions
Each job must have a runs-on value specifying the runner (e.g. ubuntu-latest) and at least one step that includes either a uses key (for an action) or a run key (for a shell command).
Watch for the 'on: true' YAML gotcha
YAML parses the bare key `on:` as a boolean true, which breaks workflow triggers. Use quotes (`'on':`) or a block mapping style to avoid this common error.
Fix errors and re-validate
Correct any reported errors in your editor, paste the updated YAML back in, and confirm no new errors appear before committing the file.
All done!
You are ready to use GitHub Actions Validator like a pro.