fix: separate test and build-push jobs #3

Merged
rock merged 1 commits from fix/separate-test-build-push into main 2026-09-07 06:24:00 +00:00
Owner

Problem

Monolithic test-build-push job runs all steps sequentially, with conditionals for push only on main. This makes it hard to see what failed and doesn't clearly separate concerns.

Fix

Split into two jobs:

  • test: Runs on all branches + PRs (go mod, vet, test, build binary)
  • build-push: Runs only on main push after test passes

Move env vars to workflow level (cleaner, reused by both jobs).

Result

  • PRs: test job runs (no docker install, no registry push)
  • Main push: test → build-push → registry push
## Problem Monolithic test-build-push job runs all steps sequentially, with conditionals for push only on main. This makes it hard to see what failed and doesn't clearly separate concerns. ## Fix Split into two jobs: - **test**: Runs on all branches + PRs (go mod, vet, test, build binary) - **build-push**: Runs only on main push after test passes Move env vars to workflow level (cleaner, reused by both jobs). ## Result - PRs: test job runs ✅ (no docker install, no registry push) ✅ - Main push: test → build-push → registry push ✅
rock added 1 commit 2026-09-07 06:12:47 +00:00
fix: separate test and build-push jobs, move to org-level env
CI / Test (pull_request) Successful in 2m9s
CI / Build & Push Image (pull_request) Skipped
99342fbdde
Changes:
- Split monolithic test-build-push into separate jobs
- test job: runs on all branches + PRs
- build-push job: only runs on main push after test passes
- Move env vars to workflow level (GOPRIVATE, REGISTRY, IMAGE)
- Remove conditional docker installs - only in build-push
- Build-push depends on test passing

Now: PRs run tests only. Main pushes build image to registry.
rock merged commit 0261ad141b into main 2026-09-07 06:24:00 +00:00
rock deleted branch fix/separate-test-build-push 2026-09-07 06:24:04 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rock/poimen-workflows#3