GitHub Actions reusable workflow "Invalid input, X is not defined" in CI
A reusable workflow accepts only the inputs it declares under on.workflow_call.inputs. Passing an undeclared key under with fails the call because that input is not defined.
What this error means
The caller fails with "invalid input, X is not defined in the referenced workflow" naming the key passed under with.
Invalid workflow file: .github/workflows/caller.yml
(Line: 7, Col: 7): invalid input, 'regionn' is not defined in the referenced workflow.Common causes
A typo in the input key under with
A misspelled key like regionn does not match any declared input, so it is rejected.
The called workflow does not declare that input
The caller passes a key the reusable workflow author never added to its inputs block.
How to fix it
Match with-keys to declared inputs
- List the declared inputs in the called workflow.
- Fix the typo, or remove the undeclared key.
- Re-run the caller.
# caller
with:
region: us-east-1
# callee declares
inputs:
region:
type: stringDeclare the input in the reusable workflow
If the input is genuinely needed, add it to the called workflow under on.workflow_call.inputs.
How to prevent it
- Keep caller
withkeys aligned with declared inputs. - Version reusable workflows so input changes are explicit.
- Review the callee inputs when updating a caller.