Branch event filters
Keep feature pushes out of a release workflow
Lesson 12 of 20 · 12 min · Module 4: A pipeline and its release boundary
A release workflow should state the source of changes it is allowed to publish.
Start this lesson →Free. No installation: you write and run the code in your browser, and it is checked automatically.
By the end, you’ll be able to…
- Filter the intended event
- Test a disallowed scenario
The idea
A workflow combines an event boundary, job dependencies, and ordered steps. Conditions and prerequisite outcomes determine which jobs can run.
01Filter the intended event
A main-only push trigger is different from running on every branch and hoping later steps are careful.
02Test a disallowed scenario
This lab supplies a feature-branch event. The expected behavior is that the job is skipped and nothing is released.
03Keep CI and release responsibilities distinct
Feature branches still need feedback. A release filter should not accidentally remove the pull-request checks a separate CI workflow provides.
Your turn
What the checks look for
- Filters main pushes only
- Skips this feature event
Take this with you
Test the events that must not cause a release.
Go a little further
Compare a tag-triggered release with a main-branch release.