GitHub Actions composite action "Input required and not supplied" in CI
A composite or JavaScript action that reads core.getInput("x", { required: true }), or declares inputs.x.required: true, fails when the step that uses it does not supply that input under with.
What this error means
The step using the action fails with "Error: Input required and not supplied: X" before the action does its work.
Error: Input required and not supplied: tokenCommon causes
The step omitted a required input
The action declares inputs.token.required: true, but the with block has no token.
The input name does not match
A typo under with means the declared required input is still unfilled.
How to fix it
Supply the required input under with
- Read the action's
action.ymlfor required inputs. - Add each one under
within the calling step. - Match names exactly.
- uses: ./.github/actions/notify
with:
token: ${{ secrets.GITHUB_TOKEN }}Provide a default in action.yml if optional
If the input is not strictly required, set required: false and a default.
inputs:
token:
required: false
default: ''How to prevent it
- Document required inputs in the action README.
- Keep
withkeys aligned to the action's inputs. - Default inputs that have a sensible fallback.