Switch GH Actions trigger from repository_dispatch
to workflow_dispatch
to enable running branches
#977
Labels
kind/improvement
An improvement to existing feature and code.
tech/engines/other
Issue in the engines repo that does not fit one of the other labels.
tech/engines
Issue for tech Engines.
topic: ci
Milestone
This is the newer Event for GH: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
That would then just get the current branch or commit name as ref param to trigger the "Build Windows" workflow with the workflow configuration from the branch.
You also need to add that event to the
on:
in the yaml, but that should already be it.A bit effort is that it requires the workflow_id as a param on the API: https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event
Not sure if that is really dynamic, but here is a GH Action in Typescript that shows it is quite straigtforward to get the ID and then use it: https://github.com/benc-uk/workflow-dispatch/blob/7ff1caf33291d1ed4001bebfa7342d5ad77eb3bf/src/main.ts#L24-L46
The text was updated successfully, but these errors were encountered: