From 5478b2d621bf8f0066c760f9854f3262d3791584 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Fri, 4 Sep 2026 14:09:40 +0200 Subject: [PATCH] CI: Image-Digest robust auslesen (buildx druckte den ganzen Block, dotenv-Upload scheiterte) --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f06e849..d3b9475 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -350,7 +350,10 @@ build:images: $TAGS \ --push \ "$CONTEXT" - DIGEST="$(docker buildx imagetools inspect "$REPO:$IMAGE_TAG" --format '{{.Manifest.Digest}}')" + # Older buildx builds ignore --format and print the whole Name/MediaType/Digest block, so + # pick the digest out of whatever comes back — a multi-line value breaks the dotenv upload. + DIGEST="$(docker buildx imagetools inspect "$REPO:$IMAGE_TAG" --format '{{.Manifest.Digest}}' | grep -oE 'sha256:[0-9a-f]{64}' | head -1)" + [ -n "$DIGEST" ] || { echo "could not read the digest of $REPO:$IMAGE_TAG" >&2; exit 1; } echo "pushed $REPO:$IMAGE_TAG @ $DIGEST" UPPER="$(echo "$IMAGE" | tr a-z A-Z)" {