fix: build supplemental images before health check #3

Merged
KofTwentyTwo merged 1 commits from fix/health-check-supplemental-ordering into main 2026-03-27 15:13:34 +00:00
KofTwentyTwo commented 2026-03-27 15:13:30 +00:00 (Migrated from github.com)

Problem

On first-release version tags (e.g. 0.1.8), the health check fails:

Running migrations image: ghcr.io/.../website-backend-migrations:0.1.8
Unable to find image locally
docker: Error response from daemon: Head "...manifests/0.1.8": unauthorized

Root cause: build_push_supplemental runs after health_check in the job. For branch tags (develop, staging), the previous pipeline already pushed those tags to GHCR so they're available. For a new version tag (0.1.8), no prior push exists — the pull fails.

Fix

Reorder steps in docker_build_push.yml:

Before: docker_build → health_check → trivy → docker_push_ghcr → build_push_supplemental

After: docker_build → trivy → build_push_supplemental → health_check → docker_push_ghcr

Supplemental images are now in the local Docker cache when the health check runs — no GHCR pull needed. The main image is still only pushed to GHCR after the health check passes.

## Problem On first-release version tags (e.g. `0.1.8`), the health check fails: ``` Running migrations image: ghcr.io/.../website-backend-migrations:0.1.8 Unable to find image locally docker: Error response from daemon: Head "...manifests/0.1.8": unauthorized ``` **Root cause:** `build_push_supplemental` runs *after* `health_check` in the job. For branch tags (`develop`, `staging`), the previous pipeline already pushed those tags to GHCR so they're available. For a new version tag (`0.1.8`), no prior push exists — the pull fails. ## Fix Reorder steps in `docker_build_push.yml`: **Before:** `docker_build → health_check → trivy → docker_push_ghcr → build_push_supplemental` **After:** `docker_build → trivy → build_push_supplemental → health_check → docker_push_ghcr` Supplemental images are now in the local Docker cache when the health check runs — no GHCR pull needed. The main image is still only pushed to GHCR after the health check passes.
Sign in to join this conversation.