GitHub Actions Tutorial — Triggers
Chapter 3 — Triggers & Events
Triggers are the “when” of GitHub Actions. Every workflow starts with an event — a push, a pull request, a schedule, a manual button click. Understanding triggers lets you control exactly when your workflows run and, just as importantly, when they don’t.
In this chapter, you’ll learn every trigger type and how to filter them by branch, path, and activity type.
What You’ll Learn
- How
pushandpull_requesttriggers work - Filtering by branch, tag, and file path
- Running workflows on a schedule with cron syntax
- Manual triggers with
workflow_dispatchinputs - Chaining workflows with
workflow_run
Topics Covered
1. Push & Pull Request
The two most common triggers. Learn how they differ, when each fires, and the important gotcha about pull requests from forks.
2. Branch & Path Filtering
Don’t run CI on every push to every branch. Filter workflows to specific branches, tags, and file paths to save minutes and reduce noise.
Read: Branch & Path Filtering →
3. Schedule & Dispatch
Run workflows on a cron schedule (nightly builds, weekly reports) or trigger them manually from the UI with custom inputs.
4. Release Events
Automate release workflows — build binaries, publish packages, or deploy when a new GitHub release is published.
5. Workflow Run Chain
Chain workflows together so one workflow triggers another. Useful for separating build and deploy pipelines.
Practice
Test your trigger knowledge with hands-on exercises.
← Previous: Chapter 2: Getting Started
Next: Chapter 4: Jobs & Runners →