Skip to content
Latchkey

GitHub Actions workflow must contain at least one job

A workflow needs a jobs: block with at least one job. An empty or missing jobs section is invalid.

What this error means

The workflow is rejected because the jobs section is missing or contains no jobs.

github-actions
The workflow is not valid. .github/workflows/ci.yml: The workflow must contain at least one job with a job id

Common causes

jobs key omitted

A workflow with only on: but no jobs: has nothing to run.

jobs indented incorrectly

If jobs children are mis-indented, the parser sees an empty jobs mapping.

How to fix it

Add a job under jobs

  1. Define at least one job id with runs-on and steps.
  2. Check the indentation of the jobs block.
.github/workflows/ci.yml
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: make

How to prevent it

  • Use a workflow template that includes a jobs block.
  • Run actionlint to verify at least one job exists.

Related guides

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