Confine release + publish builds to main #7
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
monolith-os/monolith!7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/release-only-on-main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two related fixes so feature-branch pushes stop performing
main-only actions. Both touchbuild.ymlonly.1. Only generate releases on main
generate-releasewas guarded withif: github.event_name != 'pull_request', but thepushtrigger had no branch filter — so pushing a feature branch fired apush-event build where the guard passed, ran Generate Release, and re-pointed the dated release tag at an unmerged commit (observed on the PR #5 branch:2026-06-17got re-targeted).Fix: add
&& github.ref == 'refs/heads/main'.2. Only build push events on main
The unfiltered
pushtrigger also meant a same-repo branch push fired apush-event build in addition to thepull_requestbuild — two redundantBuild Custom Imagechecks per PR, and thepushone published:latest/dated tags from unmerged code.Fix:
push: branches: [main].Preserved
pull_requesttrigger (the rebaseablepr-Nimage).mainstill build, publish:latest, and cut a release.Net effect: a PR now shows a single
(pull_request)build check, and nothing offmainpublishes images or releases.