File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 26
26
# #!/bin/sh
27
27
# echo "⚙️ Attempting QEMU registration..."
28
28
# /register || echo "ℹ️ Skipping errors – QEMU might already be registered"
29
-
30
29
- name : build
31
30
image : quay.io/buildah/stable:latest
32
31
imagePullPolicy : IfNotPresent
Original file line number Diff line number Diff line change @@ -448,15 +448,22 @@ buildah-build: check-builder load-version-json ## Build and push image (multi-ar
448
448
@echo " ✅ Using builder: $( BUILDER) "
449
449
@if [ " $( BUILDER) " = " buildah" ]; then \
450
450
echo " 🔧 Buildah detected: Performing multi-arch build..." ; \
451
+ FINAL_TAG=$(IMG ) ; \
451
452
for arch in amd64; do \
453
+ ARCH_TAG=$$ FINAL_TAG-$$ arch; \
452
454
echo " 📦 Building for architecture: $$ arch" ; \
453
455
buildah build --arch=$$ arch --os=linux -t $(IMG ) -$$ arch . || exit 1; \
454
456
echo " 🚀 Pushing image: $( IMG) -$$ arch" ; \
455
457
buildah push $(IMG ) -$$ arch docker://$(IMG ) -$$ arch || exit 1; \
456
458
done ; \
459
+ echo " 🧼 Removing existing manifest (if any)..." ; \
460
+ buildah manifest rm $$ FINAL_TAG || true ; \
457
461
echo " 🧱 Creating and pushing manifest list: $( IMG) " ; \
458
462
buildah manifest create $(IMG ) ; \
459
- buildah manifest add $(IMG ) $(IMG ) -amd64; \
463
+ for arch in amd64; do \
464
+ ARCH_TAG=$$ FINAL_TAG-$$ arch; \
465
+ buildah manifest add $$ FINAL_TAG $$ ARCH_TAG; \
466
+ done ; \
460
467
buildah manifest push --all $(IMG ) docker://$(IMG ) ; \
461
468
elif [ " $( BUILDER) " = " docker" ]; then \
462
469
echo " 🐳 Docker detected: Building with buildx..." ; \
You can’t perform that action at this time.
0 commit comments