fix(ci): publish-system-image.sh honors SYSTEM_IMAGE_BUILD_DIR

The build script derives BUILD_DIR from SYSTEM_IMAGE_BUILD_DIR (the AMI
publish workflow points it off tmpfs so the 16G Ubuntu GPU raw fits), but
the publish step hardcoded /tmp and could not find the freshly built raw.
GPU legs failed 'Raw image not found'; Alpine legs silently reused stale
pre-existing /tmp raws on the persistent runner. Mirror the build script's
derivation so publish looks where the build actually wrote.
This commit is contained in:
joshsiv-mulga
2026-07-15 07:54:21 +10:00
parent b41a193cbc
commit 1281381096
+4 -1
View File
@@ -67,7 +67,10 @@ if [[ -z "${IMAGE_NAME:-}" ]]; then
fi
# Mirror build-system-image.sh's derived paths so we reuse its cached raw.
BUILD_DIR="/tmp/${IMAGE_NAME}-image-build"
# Honor SYSTEM_IMAGE_BUILD_DIR exactly as the build script does — the workflow
# points it off tmpfs so the 16G Ubuntu GPU raw fits, and the publish step must
# look where the build actually wrote, not a hardcoded /tmp.
BUILD_DIR="${SYSTEM_IMAGE_BUILD_DIR:-/tmp}/${IMAGE_NAME}-image-build"
RAW_IMAGE="${BUILD_DIR}/${IMAGE_NAME}-${DISTRO}.raw"
OBJECT_BASE="${AMI_NAME:-$IMAGE_NAME}-${ARCH}"