Events and conditions
Events
on: says which events a forge starts runs for: a list of event names, or a map from names to filters.
pushstarts runs for pushes of branches and tags. Without filters, every push. With filters, a branch push needsbranchesto match and a tag needstagsto.pull_requeststarts runs for pull requests, filtered by their base branch. Without filters, every pull request. Pull requests from forks don't run yet.- Filters are globs on the name, where
*doesn't cross/.
Schedules aren't in the pipeline: they are created on the server (hod schedule create nightly --cron 'H 3 * * *'), and every pipeline runs on its project's schedules. Manual runs (hod run trigger) and scheduled runs start whatever on: says. hod local run runs any event you give it, and hod plan says whether the forge would have started it.
Conditions
if: on a job or a step is a CEL expression. Every expression is type-checked when the pipeline compiles, so a typo in a field name is an error from hod validate, not a job that silently never runs.
Quote an expression that starts with ! or contains : , or YAML reads it as something else. Every field of event, and the functions you can call, are in Expressions and values.
Changed files
changed() takes up to ten string patterns: * stays within a directory, ** crosses directories, a directory name (docs) covers everything under it, and ./src is the same as src. When Hod doesn't know what changed (tags, manual and scheduled runs, hod local run without --changed), changed() is true, so the work runs.
Named values
vars: are named CEL expressions, evaluated once when the run is planned. Other expressions read them as vars.<name>. They can read event and the vars above them, not jobs or matrix.