CICD-217 · Repository dispatch events
Encyclopedia · Advanced workflow orchestration · All snippets
Previous · CICD-216 · Next · CICD-218
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites authenticated GitHub CLI, approved target repositories, or Actions runner for YAML entries.
- Platforms github-actions, github-cli.
- Parameters
TARGET_REPO.
2. Copy the snippet
bash
gh api --method POST "repos/${TARGET_REPO:?}/dispatches" -f event_type=contract-refresh -f 'client_payload[source]=catalog'3. How it works
The CLI calls the named GitHub API endpoint using current repository and token permissions.
4. Verify the result
Register repository_dispatch.types on the default branch and verify one run receives the payload.
Validation syntax-validated (Bash parse). Status definitions.