GitHub Actions "Unexpected value" at a specific workflow line
By Kaveh Alemi·Latchkey
The YAML parsed but does not match the workflow schema. Actions found a value where it expected a known key or mapping.
What this error means
A validation annotation reads "The workflow is not valid. .github/workflows/x.yml (Line: N): Unexpected value <name>". The file is valid YAML but invalid as a workflow.
github-actions
The workflow is not valid. .github/workflows/ci.yml (Line: 9): Unexpected value 'step'
Common causes
Misspelled schema key
Keys like steps, runs-on, and needs are exact. A typo such as step or run-on is not recognized.
A key at the wrong nesting level
Placing a step-level key under a job, or a job-level key under steps, produces an unexpected value.
How to fix it
Match keys to the workflow schema
Compare each key against the documented workflow syntax.
Fix spelling and nesting depth at the named line.
Run actionlint to get the intended key suggestion.
Terminal
actionlint .github/workflows/ci.yml
How to prevent it
Copy structure from a known-good workflow rather than from memory.
Enable the Actions schema in your editor.
Frequently asked questions
What causes ""Unexpected value""?
Keys like steps, runs-on, and needs are exact. A typo such as step or run-on is not recognized.