-
Notifications
You must be signed in to change notification settings - Fork 59.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention that workflow needs to exist on default branch to use workflow_dispatch
#31007
Comments
Some prose should probably also be added near https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onevent_nametypes explaining which events are handled by the workflow in the default branch and which are handled by other versions of the workflow (which I believe is basically |
@jsoref Thanks for opening this issue, and providing the discussion this stemmed from 💛 I'll get this triaged for review ✨ |
@jsoref Thanks again for raising this flag on this! ✨ We've discussed with the team, and would appreciate if you could send over some snippets for what you hand in mind regarding -
|
Here's a sample workflow with some runs: https://github.com/jsoref/on.event-name.types/actions/workflows/issue-labeled.yml I'm not sure how many types this applies to, but at least for on.issue.types, only workflows on the default branch at the time the event is dispatched are consulted. -Some events have activity types that give you more control over when your workflow should run.
+Some events have activity types that give you more control over when your workflow should run.
+Generally these events are only dispatched to workflows on the default branch. The reason for this text is that there is a workflow jsoref/on.event-name.types@3bbb2e6 which is on the |
@jsoref Thanks for sending that over! Going to loop in @SiaraMist and @jc-clark to give this a quick review 💛 |
For the title item, https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatch -When using the workflow_dispatch event, you can optionally specify inputs that are passed to the workflow.
+When using the workflow_dispatch event, you can optionally specify inputs that are passed to the workflow.
+
+This event is only received by workflows on the default branch. It's documented, but not here, where a reader is likely to look for it. Instead, you have to be in:
I'm not wed to my text. It's just to point out roughly where I'd expect content and roughly what I think is needed. |
Thanks for opening this @jsoref! I agree that we should add this information to the Workflow Syntax article as well. I'd suggest adding a sentence to this section you linked that says something like:
You or anyone else is welcome to open a PR to add this information. |
Is it true that the workflow needs to exist on the default branch? It seems it's possible to trigger the registration of Plus, when I click on the Maybe I'm misunderstanding and the distinction is between the existence of the workflow file vs. the |
@huyz Hello! 👋 Your specific question would best be handled by our wonderful support team ✨ Please feel free to reach out to them for assistance! If there's anything in the documents that you have suggestions for updating, please feel free to open an issue 💛 |
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatch
What part(s) of the article would you like to see updated?
Add more text explaining requirements relating to presence on default branch
Additional information
https://github.com/orgs/community/discussions/25746#discussioncomment-8067852
Content design plan:
Add a sentence to the
on.worklfow_dispatch
section of Workflow Syntax for GitHub Actions that says something like:The text was updated successfully, but these errors were encountered: