GitHub Actions reusable workflow "Required input is not provided" in CI
A workflow_call workflow can mark inputs required: true. If the calling job omits one under with, the call fails immediately because a required input has no value.
What this error means
The caller fails before the reusable workflow runs, reporting that a required input was not provided to the called workflow.
Invalid workflow file: .github/workflows/caller.yml
(Line: 6, Col: 5): Required input 'environment' is not supplied for workflow ./.github/workflows/deploy.ymlCommon causes
The caller omitted a required input
The reusable workflow declares inputs.environment.required: true, but the calling job has no matching with.environment.
A typo in the input name under with
A misspelled key under with does not satisfy the required input, which stays unprovided.
How to fix it
Pass every required input under with
- Read the
inputsblock of the called workflow for required keys. - Provide each one under
within the calling job. - Match names exactly.
jobs:
deploy:
uses: ./.github/workflows/deploy.yml
with:
environment: productionGive the input a default if optional
If the value is not always needed, set required: false and a default in the called workflow.
inputs:
environment:
required: false
type: string
default: stagingHow to prevent it
- Document required inputs in the reusable workflow.
- Provide defaults for inputs that have a sensible fallback.
- Keep input names in sync between caller and callee.