Trigger a GitHub action with repository_dispatch

Have you ever wanted or just wondered if running a GitHub Action workflow is possible by essentially hitting a webhook?

Yes, it is! Create a repository dispatch event and make sure the workflow yaml has the repository_dispatch.

Once you have this set up:

        types: [on-something-happened]

Do this:

curl \
    -X POST \
    -H "Accept: application/vnd.github+json" \ 
    -H "Authorization: Bearer <YOUR-TOKEN>" \ \
    -d '{"event_type":"on-something-happened"}'