GitHub Actions Trigger Events

Every GitHub Actions workflow trigger event with activity types and filters.

Searchable reference for all GitHub Actions on: trigger events — push, pull_request, schedule, workflow_dispatch, workflow_call, release and more — with activity types, supported filters and usage notes.

What is the difference between pull_request and pull_request_target?

pull_request runs in the context of the merge commit with a restricted token and no secrets for fork PRs. pull_request_target runs in the base repository with full secrets and a write token, so you must never check out and execute untrusted PR code under it.

Pick the right workflow trigger

GitHub Actions workflows start in response to events declared under the on: key. This reference lists every trigger event with the activity types you can narrow on, the filters it supports (branches, tags, paths) and the gotchas worth knowing. Search by event name or keyword.

How it works

When something happens in or around a repository — a push, a pull request, a scheduled tick, a manual dispatch — GitHub emits an event. A workflow runs if its on: block names that event and any declared filters and activity types match. Activity types (types:) narrow broad events to specific actions, for example only opened and synchronize pull requests. Filters (branches, tags, paths and their -ignore variants) restrict pushes and PRs to certain refs or changed files.

Several events have important behaviour or security characteristics: pull_request_target runs with secrets and a write token even for fork PRs, schedule runs in UTC with best-effort timing, and workflow_call turns a workflow into a reusable building block. The reference surfaces these in the per-event note.

Tips and examples

  • Scope a CI run to relevant branches and files:
on:
  push:
    branches: [main]
    paths: ["src/**", "package.json"]
  • React to specific PR activity only:
on:
  pull_request:
    types: [opened, synchronize, reopened]
  • Chain a deploy after CI with workflow_run and the workflows: filter, and trigger automation from outside GitHub with repository_dispatch plus a custom event type.
  • Treat pull_request_target as privileged: never actions/checkout the PR head and run its scripts under it.