Skip to content

Instantly share code, notes, and snippets.

@qzed
Created February 18, 2020 13:30
Show Gist options
  • Save qzed/8fd25f822c2541078cc3e55315863660 to your computer and use it in GitHub Desktop.
Save qzed/8fd25f822c2541078cc3e55315863660 to your computer and use it in GitHub Desktop.
Trigger repository_dispatch event for action on github repository.
#!/usr/bin/bash
# Usage: ./trigger_dispatch.sh <org>/<repo> <user> <user-access-token>
repo="${1}"
user="${2}"
token="${3}"
curl --verbose -X POST -u "${user}:${token}" \
-H "Content-Type: application/json" \
"https://api.github.com/repos/${repo}/dispatches" \
--data '{"event_type": "repository_dispatch"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment