GitHub Actions Tutorial — Triggers

1 minute read

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 push and pull_request triggers work
  • Filtering by branch, tag, and file path
  • Running workflows on a schedule with cron syntax
  • Manual triggers with workflow_dispatch inputs
  • 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.

Read: Push & Pull Request →


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.

Read: Schedule & Dispatch →


4. Release Events

Automate release workflows — build binaries, publish packages, or deploy when a new GitHub release is published.

Read: Release Events →


5. Workflow Run Chain

Chain workflows together so one workflow triggers another. Useful for separating build and deploy pipelines.

Read: Workflow Run Chain →


Practice

Test your trigger knowledge with hands-on exercises.

Practice Exercises →


← Previous: Chapter 2: Getting Started

Next: Chapter 4: Jobs & Runners →

Updated: