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 idCommon 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
- Define at least one job id with runs-on and steps.
- Check the indentation of the jobs block.
.github/workflows/ci.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: makeHow to prevent it
- Use a workflow template that includes a jobs block.
- Run actionlint to verify at least one job exists.
Related guides
GitHub Actions "on" section missing or has no triggersFix the GitHub Actions error where the on key is missing or empty, so the workflow has no events to trigger i…
GitHub Actions "every step must define a uses or run key"Fix the GitHub Actions "every step must define a uses or run key" validation error caused by a step that has…
GitHub Actions "Invalid workflow file: error in your yaml syntax"Fix the GitHub Actions "Invalid workflow file: You have an error in your yaml syntax" message caused by tabs,…