Skip to content
Latchkey

What Is GITHUB_EVENT_NAME?

GITHUB_EVENT_NAME is the name of the event that triggered the run, such as push, pull_request, schedule, or workflow_dispatch.

A workflow can be triggered by many events. GITHUB_EVENT_NAME lets a single workflow take different actions depending on how it was started.

Common values

  • push
  • pull_request
  • schedule
  • workflow_dispatch
  • release

Example

Only deploy on a manual dispatch.

yaml
if: ${{ github.event_name == 'workflow_dispatch' }}

Key takeaways

  • GITHUB_EVENT_NAME is the triggering event.
  • Use it to branch workflow logic.
  • Full payload is at GITHUB_EVENT_PATH.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →