picostitch
crafting (and) JavaScript

Trigger Github Action by External Event

Lately I thought more often about automating my blog using webmentions and while reading the Github Actions docs, I found the following might come in handy. So I am parking that info here.

To trigger a workflow after an external event occurs, you can invoke a repository_dispatch webhook event by calling the "Create a repository dispatch event" REST API endpoint. For more information, see "Create a repository dispatch event" in the GitHub Developer documentation.

The link is https://developer.github.com/v3/repos/#create-a-repository-dispatch-event