Skip to content

Instantly share code, notes, and snippets.

@lsemenenko
Created February 22, 2020 06:18
Show Gist options
  • Save lsemenenko/91b6eb8a5ec56ebc4f0be50462a62d84 to your computer and use it in GitHub Desktop.
Save lsemenenko/91b6eb8a5ec56ebc4f0be50462a62d84 to your computer and use it in GitHub Desktop.
Trigger Github Actions repository_dispatch with curl
#!/bin/bash
TOKEN=""
REPO="" # format: username/repository
EVENT_TYPE=""
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${TOKEN}" \
--request POST \
--data '{"event_type": "${EVENT_TYPE}"}' \
https://api.github.com/repos/${REPO}/dispatches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment