🐛 fix: filter v-prefixed Docker tags in manifest creation (#12842)

This commit is contained in:
Innei 2026-03-09 16:07:06 +08:00 committed by GitHub
parent 5af5b80b83
commit 50dbc653fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,7 +122,9 @@ jobs:
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
# 过滤掉带 v 前缀的 tag如 lobehub/lobehub:v2.1.29),只保留无 v 前缀的版本号和 latest
TAGS=$(jq -cr '.tags | map(select(test(":v\\d") | not)) | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON")
docker buildx imagetools create $TAGS \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image