Skip to content

Syntax for getting the repository_dispatch type #26994

Answered by BrightRan
m-hilgendorf asked this question in Actions
Discussion options

You must be logged in to vote

@m-hilgendorf ,

Sure, you can use the property " github.event.action" of the github context to fetch the activity type of the repository_dispatch event.

The activity type ( event_type , Required) is a custom webhook event name define in the request body when you run the " Create a repository dispatch event" API. You can set the name as any you like.

When using the API to trigger a workflow on the repository_dispatch event, the data you set in the request body will be passed into the github context of the triggered workflow run. The value of " event_type" will be passed to " github.event.action", and " client_payload" will be copied into the github context as a sub-object of " github.event".

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants