GitHub Actions "shell: required" for a composite action run step in CI
In a composite action, every run: step must specify shell:. There is no default shell for composite run steps, so omitting it fails validation with "required property is missing: shell".
What this error means
Loading the composite action fails with "required property is missing: shell" pointing at a run: step in action.yml.
GitHub Actions
Error: (Line: 8, Col: 9): Required property is missing: shell
# a run step in action.yml has no shell keyCommon causes
A run step without shell in a composite action
Composite actions do not inherit a default shell, so any run: step that omits shell: is invalid.
Copied a workflow step into an action
Workflow run steps default their shell, so a step copied from a workflow into a composite action loses its implicit shell and must add one.
How to fix it
Add shell to every composite run step
- Open action.yml and find each run: step under runs.steps.
- Add shell: bash (or pwsh, sh, cmd, powershell) to each.
- Re-run so validation passes.
action.yml
runs:
using: composite
steps:
- run: echo "hello"
shell: bashPick the right shell per platform
Use bash on Linux/macOS, pwsh for cross-platform PowerShell, or cmd/powershell on Windows-only steps.
action.yml
- run: Write-Host "hi"
shell: pwshHow to prevent it
- Set shell: on every run step in composite actions.
- Remember composite actions have no default shell.
- Lint action.yml to catch missing shell keys.
Related guides
GitHub Actions "Can't find action.yml" / "Missing download info" for a composite action in CIFix "Can't find 'action.yml'" or "Missing download info" for a composite action in CI - the uses path does no…
GitHub Actions composite action "Input required and not supplied" in CIFix "Input required and not supplied: X" in a composite action in CI - the action declares a required input t…
GitHub Actions composite action cannot define jobs or use in CIFix a composite action that fails because it declares jobs or a job-level uses in CI - a composite action def…