@@ -287,13 +287,28 @@ jobs:
287
287
ARM64 : ${{ needs.build-arm64.outputs.hub_digest }}
288
288
run : |
289
289
set -euo pipefail
290
+ # must have both digests
291
+ if [ -z "${AMD64:-}" ] || [ -z "${ARM64:-}" ]; then
292
+ echo "Missing hub digests (amd64='${AMD64:-}', arm64='${ARM64:-}')."
293
+ exit 1
294
+ fi
295
+
296
+ # stitch each tag from the hub meta
290
297
while IFS= read -r ref; do
291
298
[[ -z "$ref" ]] && continue
292
299
img="${ref%%:*}"; tag="${ref#*:}"
300
+
301
+ # optional: refuse v-prefixed tags (defensive)
302
+ if [[ "$tag" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then
303
+ echo "Refusing to publish v-prefixed tag: $img:$tag"
304
+ exit 1
305
+ fi
306
+
307
+ echo "⛵ ${img}:${tag}"
293
308
docker buildx imagetools create \
294
- --tag "$img:$ tag" \
295
- "$img@${AMD64}" \
296
- "$img@${ARM64}"
309
+ --tag "${ img}:${ tag} " \
310
+ "${ img} @${AMD64}" \
311
+ "${ img} @${ARM64}"
297
312
done < <(printf "%s" "${{ steps.meta_hub.outputs.tags }}")
298
313
299
314
- name : Create singleuser multi-arch manifests
@@ -303,11 +318,21 @@ jobs:
303
318
ARM64 : ${{ needs.build-arm64.outputs.su_digest }}
304
319
run : |
305
320
set -euo pipefail
321
+ # must have both digests
322
+ if [ -z "${AMD64:-}" ] || [ -z "${ARM64:-}" ]; then
323
+ echo "Missing singleuser digests (amd64='${AMD64:-}', arm64='${ARM64:-}')."; exit 1
324
+ fi
325
+ # stitch each tag
306
326
while IFS= read -r ref; do
307
327
[[ -z "$ref" ]] && continue
308
328
img="${ref%%:*}"; tag="${ref#*:}"
329
+ # optional: assert we aren't accidentally using a v-prefixed tag
330
+ if [[ "$tag" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then
331
+ echo "Refuses to publish v-prefixed tag: $img:$tag"; exit 1
332
+ fi
333
+ echo "⛵ ${img}:${tag}"
309
334
docker buildx imagetools create \
310
- --tag "$img:$ tag" \
311
- "$img@${AMD64}" \
312
- "$img@${ARM64}"
313
- done < <(printf "%s" "${{ steps.meta_su.outputs.tags }}")
335
+ --tag "${ img}:${ tag} " \
336
+ "${ img} @${AMD64}" \
337
+ "${ img} @${ARM64}"
338
+ done < <(printf "%s" "${{ steps.meta_su.outputs.tags }}")
0 commit comments