Skip to content
Latchkey

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 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

  1. Ensure each step begins with a dash at the correct indent.
  2. Keep uses/run/with under each dash item.
  3. Validate with a YAML linter or actionlint.
.github/workflows/ci.yml
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - 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.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →