Interview Prep/GitHub Actions/Workflows Not Triggering & Invalid Files

`The workflow is not valid. .github/workflows/ci.yml (Line: 9, Col: 5): Unexpected value 'steps'`

BeginnerTroubleshootingWorkflows Not Triggering & Invalid Files
Answer

Likely causes → steps placed at the wrong level (under on or directly under jobs instead of under a job id), or a job that uses uses: (reusable workflow call) also has steps or runs-on.

Diagnose →

yq '.jobs | keys' .github/workflows/ci.yml
yq '.jobs.build | keys' .github/workflows/ci.yml

Fix → Nest as jobs.<id>.runs-on and jobs.<id>.steps. For reusable workflow calls, move steps into the called workflow.

Prevent → actionlint reports the exact key and allowed alternatives.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflows Not Triggering & Invalid Files