From 4189588ee174df6a6846f135614808384818d586 Mon Sep 17 00:00:00 2001 From: yuez Date: Fri, 13 Nov 2026 17:24:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20merge=20job=20=E9=87=8C=20tags=20?= =?UTF-8?q?=E6=98=AF=E5=A4=9A=E8=A1=8C=E6=96=87=E6=9C=AC=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=20JSON=EF=BC=8C=E6=94=B9=E7=94=A8=E9=80=90=E8=A1=8C=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF=E6=8B=BC=20-t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a0411a1..cd0a41a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -198,10 +198,14 @@ jobs: run: | set -euo pipefail ls -l - tag_args=$(jq -r '.tags[]? | "-t \(.)"' <<< "${{ steps.meta.outputs.tags }}" | tr '\n' ' ') - echo "tags: $tag_args" + # metadata 的 tags 是多行文本,逐行转成 -t 参数(不能用 jq:它不是 JSON) + tag_args=() + while IFS= read -r tag; do + [ -n "$tag" ] && tag_args+=(-t "$tag") + done <<< "${{ steps.meta.outputs.tags }}" + printf 'tag: %s\n' "${tag_args[@]}" docker buildx imagetools create \ - $tag_args \ + "${tag_args[@]}" \ $(printf "${IMAGE}@sha256:%s " *) - name: Inspect published manifest