ci: restrict push-event CI to protected branches (main)
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful

Every feature-branch push currently fires TWO pipelines — a push CI and a
pull_request CI — doubling load on the storage-constrained (spinning-disk)
Woodpecker runner. The push run on feature branches is redundant; the PR
pipeline is the merge gate. Run push CI only on main; PR + manual CI still
run on every branch. ~halves feature-branch CI load, zero loss of gating
(branch protection requires no push/ci status context).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QDgorbfgN4Fgi1iHGkgndn
This commit is contained in:
Jarvis
2026-07-12 17:19:24 -05:00
parent 353e43c947
commit 5c7aaac955

View File

@@ -7,7 +7,14 @@ variables:
- &enable_pnpm 'corepack enable' - &enable_pnpm 'corepack enable'
when: when:
- event: [push, pull_request, manual] # PR + manual CI run on any branch — the pull_request pipeline is the merge gate.
# push CI is restricted to protected branches (main) so a feature-branch push no
# longer fires a redundant SECOND pipeline alongside its PR pipeline. This ~halves
# CI load on the storage-constrained runner with zero loss of gating (branch
# protection requires no push/ci status context; main still gets full push CI).
- event: [pull_request, manual]
- event: push
branch: main
# Turbo remote cache (turbo.mosaicstack.dev) is configured via Woodpecker # Turbo remote cache (turbo.mosaicstack.dev) is configured via Woodpecker
# repository-level environment variables (TURBO_API, TURBO_TEAM, TURBO_TOKEN). # repository-level environment variables (TURBO_API, TURBO_TEAM, TURBO_TOKEN).