fix(ci): merge job 里 tags 是多行文本不是 JSON,改用逐行循环拼 -t

This commit is contained in:
yuez committed 2026-11-13 17:24:16 +08:00
1 parent 5ddbd033fe
commit 4189588ee1
1 file changed
+7 -3
+7 -3
View File
@@ -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