A gh CLI extension for triggering repository_dispatch and/or workflow_dispatch events and watching the resulting GitHub Actions workflow run.
Trigger a repository dispatch event and watch the resulting GitHub Actions run from your terminal:
gh dispatch repository \
--repo "mdb/gh-dispatch" \
--workflow "Hello" \
--event-type "hello" \
--client-payload '{"name": "mike"}'
Trigger a workflow dispatch event and watch the resulting GitHub Actions run from your terminal:
gh dispatch workflow \
--repo "mdb/gh-dispatch" \
--workflow "workflow_dispatch.yaml" \
--inputs '{"name": "mike"}'
Install the gh
CLI for your platform. For example, on Mac OS:
brew install gh
Install the latest dispatch
extension from its releases:
gh extension install mdb/gh-dispatch
Build and test gh-dispatch
locally:
make
Install a locally built gh-dispatch
for use as gh dispatch
:
make install
Run acceptance tests against a local gh-dispatch
installation, verifying the local gh-dispatch
is able to trigger dispatch events and render the expected output:
make acc-test