GitHub Actions "every step must define a 'uses' or 'run' key"
A step in your steps: list has metadata (name, if, env) but no uses: action or run: command, so there is nothing for it to do and the workflow is rejected.
What this error means
The workflow is invalid with ".github#L1 every step must define a uses or run key", pointing at a step that has no action and no command.
Invalid workflow file: .github/workflows/ci.yml
.github#L12 every step must define a 'uses' or 'run' keyCommon causes
Step has only metadata
A step that lists name:, if:, or env: but neither uses: nor run: has no executable body, which is invalid.
Indentation orphaned the run/uses
A run: or uses: indented one level too deep becomes a child of the wrong key, so the step it was meant for ends up empty.
How to fix it
Give every step a uses or run
Each list item under steps: must call an action with uses: or execute a command with run:.
steps:
- name: Build
run: make # run a command
- uses: actions/checkout@v4 # or call an actionCheck the step indentation
- Confirm run: / uses: align with name: inside the same list item (a leading - per step).
- Remove placeholder steps that only carry a comment or name.
- Validate with actionlint, which flags steps missing uses/run.
How to prevent it
- Ensure every step has exactly one of uses: or run:.
- Keep step keys aligned under the same list item.
- Lint workflows with actionlint to catch empty steps.