mirror of
https://github.com/zgs225/secgate-vpn-docker.git
synced 2026-11-25 15:21:14 +08:00
fix(ci): merge job 里 tags 是多行文本不是 JSON,改用逐行循环拼 -t
This commit is contained in:
1 parent
5ddbd033fe
commit
4189588ee1
1 file changed
+7
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user