GitHub Actions reusable workflow required input not provided by the caller
A reusable workflow declares inputs under on.workflow_call.inputs. Any input marked required: true must be passed by the caller via with, or the call fails validation before any job runs.
What this error means
Calling the reusable workflow fails immediately with a message that a required input was not provided.
github-actions
Invalid workflow file: required input 'environment' was not provided.
The workflow 'deploy.yml' requires input 'environment' but the caller did not supply it.Common causes
Caller omitted a required with input
A required input has no default, so the caller must supply it explicitly.
Input name mismatch
A typo in the with key does not match the declared input, so the required input stays unset.
How to fix it
Supply every required input in with
- List each required input under with in the calling job.
- Match the input names exactly to the callee declaration.
.github/workflows/ci.yml
jobs:
deploy:
uses: ./.github/workflows/deploy.yml
with:
environment: productionGive the input a default if it is optional
- If the input is not truly mandatory, set required: false and add a default in the callee.
- This lets callers omit it safely.
How to prevent it
- Document required inputs and keep caller with keys in sync.
- Prefer defaults for inputs that have a sensible fallback.
Related guides
GitHub Actions cannot use needs in a reusable workflow inputFix a reusable workflow call that references the needs context inside a with input, which is not available th…
GitHub Actions Reusable Workflow Input Type MismatchFix GitHub Actions reusable workflow input type errors - passing a string where boolean or number is declared…
GitHub Actions "Unexpected input(s), valid inputs are ..." (action input typo)Fix GitHub Actions "Unexpected input(s) ..., valid inputs are ..." - the with: block passed an input the acti…