-
Notifications
You must be signed in to change notification settings - Fork 63.1k
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
The docs say that workflow_dispatch
will only trigger a workflow run "if the workflow file is on the default branch".

However, below it's shown that the user can choose which branch to use:
I'm struggling to interpret the phrasing from the docs. Let's say we have .github/workflows/deploy.yml
with a trigger on: workflow_dispatch
. The default branch is main
. Which interpretation is true?
-
a) Only
deploy.yml@main
can ever run. The versions in other branches can never run. The branch selector does nothing. -
b) If
deploy.yml
exists inmain
, then the user can trigger a version located in any branch. Ifdeploy.yml
does not exist inmain
, the versions in other branches cannot be triggered. -
c) The user can trigger a version of
deploy.yml
located in any branch. However, if ANOTHER WORKFLOW tries to triggerdeploy.yml
viagh
, API, or by any other means, then this ANOTHER WORKFLOW must be located inmain
. -
d) ...something else?
Additional information
No response