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 sequence
Common 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-lateststeps:- uses:actions/checkout@v4- run:npm ci
How to prevent it
Run actionlint in CI to catch structural mistakes early.
Configure your editor to show YAML indentation guides.
Frequently asked questions
What causes ""steps must be a sequence""?
Without - before the first uses/run, steps parses as a mapping, not a list.