GitHub Actions defaults.run.shell is ignored inside a composite action
defaults.run.shell is a workflow/job setting. A composite action does not honor it: every run step in a composite action must specify its own shell, or the action fails to parse.
What this error means
A composite action errors that shell is required on a run step even though defaults.run.shell was set in the calling workflow.
github-actions
Error: Required property is missing: shell
A composite action run step must explicitly set 'shell'.Common causes
defaults does not propagate into actions
Job-level defaults apply to the job’s own steps, not to steps defined inside a composite action.
Run step missing an explicit shell
Composite run steps mandate a shell value with no inherited default.
How to fix it
Set shell on every composite run step
- Add a shell value to each run step inside the composite action.
- Use bash, pwsh, sh, etc. as appropriate.
action.yml
runs:
using: composite
steps:
- run: echo hello
shell: bashStandardize on one shell across the action
- Pick a single shell for the action and apply it consistently.
- Document the shell requirement for maintainers.
How to prevent it
- Always set shell explicitly on composite run steps.
- Do not rely on workflow defaults inside actions.
Related guides
GitHub Actions composite action "shell is required"Fix GitHub Actions composite-action error where a run step is missing the required shell field.
GitHub Actions cannot set permissions inside a composite actionFix a composite action that tries to declare permissions, which is only valid at the workflow or job level.
GitHub Actions working-directory is ignored on a uses stepFix a step where working-directory has no effect because it only applies to run steps, not uses steps.