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
pushpull_requestscheduleworkflow_dispatchrelease
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.