ci: build+push image only on main merge or release tag #137

Merged
fastie81 merged 1 commit from ci/build-on-merge into main 2026-09-06 17:35:39 +12:00
Owner

Gates the image build+push to main merges and v-tag releases only.

Before: every feature-branch push ran the build job (docker buildx, docker login, image push of a disposable ci-, registry prune).

After: branch/PR pushes run only test + lint-frontend for fast feedback. The build job (and its push + prune) fires only on:

  • main (deploy to test node)
  • v tags (promote test -> prod)

deploy already needs build and gates on the same condition, so a broken Dockerfile/requirements change is still caught by deploy's need:build before anything is released -- no prod risk. No image is ever pushed or pruned on a non-release branch.

Verified on this branch: test 2m16s, lint 58s; build + deploy correctly skipped.

Gates the image build+push to main merges and v-tag releases only. Before: every feature-branch push ran the build job (docker buildx, docker login, image push of a disposable ci-<sha>, registry prune). After: branch/PR pushes run only test + lint-frontend for fast feedback. The build job (and its push + prune) fires only on: - main (deploy to test node) - v<semver> tags (promote test -> prod) deploy already needs build and gates on the same condition, so a broken Dockerfile/requirements change is still caught by deploy's need:build before anything is released -- no prod risk. No image is ever pushed or pruned on a non-release branch. Verified on this branch: test 2m16s, lint 58s; build + deploy correctly skipped.
ci: only build+push the image on main merge or v-tag release
All checks were successful
CI / test (push) Successful in 2m16s
CI / lint-frontend (push) Successful in 58s
CI / build (push) Has been skipped
CI / deploy (push) Has been skipped
cb749f1441
Branch/PR pushes now run just test + lint-frontend for fast feedback.
The build job (and its image push + registry prune) only fires on:
  - main (deploy to test node)
  - v<semver> tags (promote test -> prod)

Previously every feature-branch push built and pushed a disposable ci-<sha>
image. deploy already gates on the same condition and needs build, so a
broken Dockerfile is still caught before anything deploys - no prod risk.

Caching was confirmed already live (runner internal cache server enabled,
1.2G in /root/.cache/act): actions/cache (pip), setup-node (npm) and Docker
inline layer cache all persist across runs, so no cache change needed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fastie81/honbu-manager!137
No description provided.