Skip to content
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

documentation on on.workflow_dispatch is not correct/complete #34884

Closed
1 task done
tomsit-ionos opened this issue Oct 10, 2024 · 5 comments
Closed
1 task done

documentation on on.workflow_dispatch is not correct/complete #34884

tomsit-ionos opened this issue Oct 10, 2024 · 5 comments
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team

Comments

@tomsit-ionos
Copy link

tomsit-ionos commented Oct 10, 2024

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#repository_dispatch

This event will only trigger a workflow run if the workflow file is on the default branch.

Note that this text is defined on 1 place ({% data reusables.actions.workflow-dispatch %}) and used in several places.
It might be that it is correct in some use cases.

What part(s) of the article would you like to see updated?

it is possible to run WFs via workflow-dispatch event on branches other than the default (thru the API, maybe not UI)
there are some ramifications though

  • the WF must have run at least once, otherwise GH doesnt seem to know it's name
  • i do this via GH CLI by also adding an on.push while on a feature branch

see

Additional information

cli/cli#5268

@tomsit-ionos tomsit-ionos added the content This issue or pull request belongs to the Docs Content team label Oct 10, 2024
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 10, 2024
@tomsit-ionos tomsit-ionos changed the title documentation on on.workflow_dispatch is not correct documentation on on.workflow_dispatch is not correct/complete Oct 10, 2024
@nguyenalex836 nguyenalex836 added actions This issue or pull request should be reviewed by the docs actions team and removed triage Do not begin working on this issue until triaged by the team labels Oct 10, 2024
@nguyenalex836
Copy link
Contributor

@tomsit-ionos Thank you very much for raising an issue! ✨ While we appreciate the method you've shared to run WFs via the workflow-dispatch event on branches other than the default, this method isn't officially supported.

For that reason, we are unable to add this to our docs. We still thank you for your willingness to contribute 🙇

If you're looking for issues to pick up, take a look at our help wanted section to find open issues you can work on 💛

@tomsit-ionos
Copy link
Author

hm, that is unfortunate.
But how do u test a new/modified WF definition before it is merged to main ?

@nguyenalex836
Copy link
Contributor

how do u test a new/modified WF definition before it is merged to main

This question would best be handled by our wonderful support team - please feel free to reach out to them 💛

@tomsit-ionos
Copy link
Author

hi,
i think i u might want to reopen this issue, as the API clearly states to be able to pass in a tag/branch name.
image

see https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event

@nguyenalex836
Copy link
Contributor

@tomsit-ionos Thank you! We're reviewing this now, and will provide an update after 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team
Projects
None yet
Development

No branches or pull requests

2 participants