mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
fix(image-build): pass INFINITO_SRC_DIR as build-arg
Commit a77a57040 dropped the inline default from the Dockerfile's
INFINITO_SRC_DIR ARG so env/default.env stays the only SPOT. The
compose-driven build path already forwards the value via
compose.yml's build.args, but the standalone scripts/image/{build,push}.sh
paths (local `make build`, CI `🏗️ Build (<distro>)`) had not been
updated. Without --build-arg INFINITO_SRC_DIR=..., the ARG resolves
to empty inside the image, so `RUN /bin/bash ${INFINITO_SRC_DIR}/roles/...`
becomes `/bin/bash /roles/...` and exits 127.
Both scripts now assert INFINITO_SRC_DIR (sourced from
scripts/meta/env/load.sh) and pass it through.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
cb0323c74e
commit
5e0036dfa9
2 files changed
+3
No files matched your search
@@ -259,8 +259,10 @@ fi
|
||||
echo "------------------------------------------------------------"
|
||||
|
||||
# Common build args
|
||||
: "${INFINITO_SRC_DIR:?INFINITO_SRC_DIR must be set; source scripts/meta/env/load.sh}"
|
||||
build_args=(
|
||||
--build-arg "INFINITO_PARENT_IMAGE=${PKGMGR_IMAGE}"
|
||||
--build-arg "INFINITO_SRC_DIR=${INFINITO_SRC_DIR}"
|
||||
--build-arg "NIX_CONFIG=${NIX_CONFIG:-}"
|
||||
)
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ while true; do
|
||||
--tag "ghcr.io/${ghcr_owner}/${repo_name}/${MATRIX_DISTRO}:${IMAGE_TAG}" \
|
||||
--label "org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}" \
|
||||
--build-arg "INFINITO_PARENT_IMAGE=ghcr.io/kevinveenbirkenbach/pkgmgr-${MATRIX_DISTRO}:stable" \
|
||||
--build-arg "INFINITO_SRC_DIR=${INFINITO_SRC_DIR:?INFINITO_SRC_DIR must be set; source scripts/meta/env/load.sh}" \
|
||||
"${nix_arg[@]}" \
|
||||
--cache-from "type=gha,scope=${repo_name}-${MATRIX_DISTRO}" \
|
||||
--cache-to "type=gha,mode=max,scope=${repo_name}-${MATRIX_DISTRO}" \
|
||||
|
||||
Reference in new issue
Block a user