Interview Prep/GitHub Actions/Triggers & Events

What is `repository_dispatch` and how does it differ from `workflow_dispatch`?

IntermediateConceptTriggers & Events
Answer

repository_dispatch is a webhook you fire at the repo with a custom event_type and arbitrary client_payload JSON; every workflow listening for that type runs on the default branch. It is for cross-repo or external-system triggers ("library released, rebuild consumers"). workflow_dispatch targets one workflow, on a chosen ref, with typed inputs, and has a UI button.

gh api repos/ORG/app/dispatches -f event_type=lib-released \
  -F 'client_payload[version]=2.3.0'
on:
  repository_dispatch:
    types: [lib-released]
All GitHub Actions questions Roadmap: GitHub Actions

More on Triggers & Events