A single workflow file must be callable as a reusable workflow and manually triggerable with an environment input. What belongs under 'on:'?
Select an answer to reveal the explanation.
Short Explanation and Infographic
You can list workflow_call and workflow_dispatch together on one workflow so the same jobs serve reusable and manual entry points.
Full explanation below image
Full Explanation
GitHub allows multiple triggers on one workflow. A common pattern is on.workflow_call for reuse plus on.workflow_dispatch for operator runs. Inputs can be declared under each trigger (schemas are separate). Callers use jobs.<id>.uses pointing at the file; humans use the Actions UI or gh workflow run. repository_dispatch is a different webhook-style trigger. workflow_run reacts to other workflows finishing. When sharing jobs, be careful that required inputs exist for each entry path or provide defaults.