Skip to content
Latchkey

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 key

Common 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

  1. Open action.yml and find each run: step under runs.steps.
  2. Add shell: bash (or pwsh, sh, cmd, powershell) to each.
  3. Re-run so validation passes.
action.yml
runs:
  using: composite
  steps:
    - run: echo "hello"
      shell: bash

Pick 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: pwsh

How 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

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