Skip to content

Repository files navigation

CI/CD

gh-dispatch

A gh CLI extension for triggering repository_dispatch and/or workflow_dispatch events and watching the resulting GitHub Actions workflow run.

demo

Usage

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"}'

Installation

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

Development

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

About

A gh CLI extension for sending GitHub dispatch events and watching the triggered GitHub Actions runs directly from your terminal.

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages