GitHub Actions "jobs.X.steps must be a sequence"
jobs.<id>.steps must be a YAML sequence (a list of - items). A missing dash, an accidental mapping, or wrong indentation makes the parser see a mapping and reject the file.
What this error means
The workflow is invalid at parse time pointing at the steps key, usually because the first step lost its leading dash or the steps block is indented as a mapping.
github-actions
Invalid workflow file: .github/workflows/ci.yml#L8
jobs.build.steps must be a sequenceCommon causes
Missing leading dash on steps
Without - before the first uses/run, steps parses as a mapping, not a list.
Wrong indentation under steps
Over- or under-indenting collapses the list into a single mapping node.
How to fix it
Write steps as a list
- Ensure each step begins with a dash at the correct indent.
- Keep uses/run/with under each dash item.
- Validate with a YAML linter or actionlint.
.github/workflows/ci.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ciHow to prevent it
- Run actionlint in CI to catch structural mistakes early.
- Configure your editor to show YAML indentation guides.
Related guides
GitHub Actions "You have an error in your YAML syntax" (tab characters)Fix "You have an error in your YAML syntax on line N" caused by tab characters - YAML forbids tabs for indent…
GitHub Actions "A mapping was found where a sequence is expected"Fix "A mapping was found where a sequence is expected" - a list-typed key like steps or jobs.<id>.needs was w…
GitHub Actions "'runs-on' is required"Fix "'runs-on' is required" - every GitHub Actions job must declare a runner with runs-on (unless it only cal…