A workflow file must be invokable both manually from the Actions UI and as a reusable workflow from other repositories' workflows. Which 'on:' configuration supports both entry points?
Select an answer to reveal the explanation.
Short Explanation and Infographic
List both workflow_dispatch (manual UI/API) and workflow_call (reusable caller) under on:. A reusable-only file needs workflow_call; adding workflow_dispatch also enables the Run workflow button.
Full explanation below image
Full Explanation
Reusable workflows are enabled by the workflow_call trigger. Manual runs from the Actions tab use workflow_dispatch. Putting both under on: makes one YAML file serve as a callable shared pipeline and a human-triggered workflow. push/pull_request alone never make a workflow reusable. workflow_run chains off another workflow's completion and is a different pattern (also with security caveats). repository_dispatch is for external HTTP/API triggers with a custom event type, not for uses: caller workflows. You can also declare inputs under each trigger — note that workflow_call and workflow_dispatch define inputs separately and their schemas are not automatically shared, though they can mirror each other for a consistent contract.