The 'on' block is your scheduler
Every workflow declares its triggers under on:. The most common triggers, in roughly the order you'll use them:
push— fires on every push. Filterable by branches, tags, paths.pull_request— fires on PR open, sync (new commit), reopen, etc. Filterable by branches, paths, types.schedule— cron-like, in UTC.'0 6 * * *'= 06:00 UTC daily.workflow_dispatch— manual trigger from UI / API / CLI. Inputs are first-class.release— fires on release events (created, published, edited).workflow_call— makes this workflow callable from another (reusable workflow).repository_dispatch— external system POSTs to fire it.merge_group— fires inside a merge queue.
Filters narrow the trigger
You almost never want bare on: push. You want push to main or push that changed source files. Filters live under each event:
branches/branches-ignoretags/tags-ignorepaths/paths-ignore— glob patterns matched against changed files.types— for events with sub-types (PR opened/synchronized/reopened).