Interview Prep/GitHub Actions/Workflows Not Triggering & Invalid Files

`Invalid input, environment is not defined in the referenced workflow.` when calling a reusable workflow

IntermediateTroubleshootingWorkflows Not Triggering & Invalid Files
Answer

Likely causes → The caller passes with: environment: dev but the called workflow's workflow_call.inputs does not declare environment, or names differ in case or spelling (env vs environment). Same pattern for secrets not declared.

Diagnose →

yq '.on.workflow_call.inputs | keys' .github/workflows/deploy.yml

Fix → Declare every input and secret the caller passes, or stop passing it.

Prevent → Treat workflow_call inputs as an API and document them in the file header.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflows Not Triggering & Invalid Files