Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
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 in main, then the user can trigger a version located in any branch. If deploy.yml does not exist in main, 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 trigger deploy.yml via gh, API, or by any other means, then this ANOTHER WORKFLOW must be located in main.
-
d) ...something else?
Additional information
No response
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
What part(s) of the article would you like to see updated?
The docs say that
workflow_dispatchwill 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.ymlwith a triggeron: workflow_dispatch. The default branch ismain. Which interpretation is true?a) Only
deploy.yml@maincan ever run. The versions in other branches can never run. The branch selector does nothing.b) If
deploy.ymlexists inmain, then the user can trigger a version located in any branch. Ifdeploy.ymldoes not exist inmain, the versions in other branches cannot be triggered.c) The user can trigger a version of
deploy.ymllocated in any branch. However, if ANOTHER WORKFLOW tries to triggerdeploy.ymlviagh, API, or by any other means, then this ANOTHER WORKFLOW must be located inmain.d) ...something else?
Additional information
No response