From e93d7bd7a24b055eaf09e3c3f95d627bef1c365b Mon Sep 17 00:00:00 2001 From: Graham Barber Date: Thu, 16 Jul 2026 22:52:36 -0700 Subject: [PATCH] fix image-build CI: read version from package.json TANGLED_REF_NAME is unbound in the Spindles step, so `set -u` aborted before docker login. Derive the version from package.json (the ChronVer source of truth) instead of a CI-provided ref variable. Co-Authored-By: Claude Opus 4.8 --- .tangled/workflows/build-image.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.tangled/workflows/build-image.yml b/.tangled/workflows/build-image.yml index ec8d2ca..b41841f 100644 --- a/.tangled/workflows/build-image.yml +++ b/.tangled/workflows/build-image.yml @@ -25,7 +25,11 @@ steps: set -euo pipefail image="atcr.io/graham.systems/quantum" - version="$TANGLED_REF_NAME" + # Version is the project's source of truth (package.json); at a release + # tag's commit it equals the ChronVer tag name. Read it from the tree + # rather than a CI ref variable, whose name/availability we can't rely on. + version="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)" + test -n "$version" || { echo "could not read version from package.json"; exit 1; } echo "$REGISTRY_TOKEN" | docker login atcr.io -u "$REGISTRY_USER" --password-stdin -- 2.51.2