GitHub Actions Triggers Cheat Sheet: Events & Filters
Every workflow trigger and filter you configure under on:, in one reference.
Events, activity types, and the path/branch filters that control when workflows run.
Common events
| Event | Fires on |
|---|---|
| push | Commits pushed to a ref |
| pull_request | PR activity (fork = no secrets) |
| pull_request_target | PR event, base-repo context |
| workflow_dispatch | Manual run with inputs |
| schedule | Cron (UTC, default branch only) |
| workflow_call | Called as reusable workflow |
| release | Release published/created |
| issue_comment | Comment on issue/PR |
Activity types
| Event:type | Meaning |
|---|---|
| pull_request: [opened, synchronize] | New PR or new push |
| pull_request: [closed] | Merged or closed |
| release: [published] | Release goes public |
| issues: [labeled] | Label added |
Filters
.github/workflows/ci.yml
on:
push:
branches: [main, 'release/**']
tags: ['v*']
paths: ['src/**', '!**/*.md']
pull_request:
branches-ignore: [experimental]
paths-ignore: ['docs/**']Manual inputs
workflow_dispatch
on:
workflow_dispatch:
inputs:
env:
type: choice
options: [dev, prod]
dry_run:
type: boolean
default: trueKey takeaways
- paths and branches use glob patterns; ! negates.
- schedule only runs on the default branch.
- pull_request from a fork has no access to secrets.
Related guides
GitHub Actions Cheat Sheet: Syntax, Contexts & CommandsA GitHub Actions cheat sheet - triggers, jobs, steps, contexts, expressions, caching, matrix, and the workflo…
GitHub Actions Contexts Cheat Sheet: github, env, job & moreA GitHub Actions contexts cheat sheet - github, env, vars, secrets, job, steps, runner, matrix, and needs wit…
Cron Expressions Cheat Sheet: Fields, Syntax & ExamplesA cron expressions cheat sheet - the five fields, special characters, common schedules, and ready-to-use exam…