-
I do have a separate branch where I’m currently playing around with actions. Since I need to trigger actions externally I wanted to make use of the repository_dispatch event (https://help.github.com/en/articles/events-that-trigger-workflows#external-events-repository_dispatch) which seems to be right choice - but sadly I can’t get it to work. My workflow.yml:
When I try the following cURL I get the proper 204 response:
But the action is not triggered. I really need to trigger actions from external - anyone can help me in this regard? I’ve ran out of ideas 😦 |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 1 reply
-
Definitely something missing from the docs: the repository_dispatch only triggers on the master branch. |
Beta Was this translation helpful? Give feedback.
-
Which makes it useless for anything branch related. So most of the CI related things 😕 That’s sad! |
Beta Was this translation helpful? Give feedback.
-
While I agree this is uselss and very annoying. It is annoying because you must pollute and directly work on this CI command in master to test and develop… It can still benefit you because you can checkout certain branches on any given CI command:
|
Beta Was this translation helpful? Give feedback.
-
Check out the checkout action docs: https://github.com/actions/checkout#Checkout-a-different-branch |
Beta Was this translation helpful? Give feedback.
-
I was planning to put my docker image qualification into a workflow that I could call from either a pull request or on a release; neither of which would execute from master. Is there another way to trigger a workflow from another workflow on a pull request or release (tag-based href) build? |
Beta Was this translation helpful? Give feedback.
-
This limitation effectively means that we can only use a single branch - master - for releases. Our use-case requires commits to one repository to trigger builds in another repository, and repository_dispatch seems to fit the bill. Since we have release branches - i.e. 3.7.x, 3.8.x - these cannot be triggered via repository_dispatch events, which is a pretty big deal for us. Our options are to either combine multiple repositories into a single one (a significant amount of work), or trigger an action from a remote repository that would in turn trigger the workflow. Why do repository_dispatch events have this artificial & severe limitation? |
Beta Was this translation helpful? Give feedback.
-
Has there been any progress on this? We touched on this GitHub Actions aspect today and are starting to consider other alternatives to GitHub Actions. In other words, this limitation is a pretty big deal for us. |
Beta Was this translation helpful? Give feedback.
-
GitHub actions token has a restriction that means it cannot trigger workflows. You need to use a service account personal access token to dispatch the event. The workflow will then run, as long as you include a ref to checkout in your event, you can then checkout any branch. I think most people here are hitting if you use GITHUB_TOKEN it will not trigger workflows |
Beta Was this translation helpful? Give feedback.
Definitely something missing from the docs: the repository_dispatch only triggers on the master branch.