From 943172e8e076e06d1e83536720fc2299eff87ea4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 21 Sep 2025 15:37:33 +1200 Subject: [PATCH] Fix manifest list creation for multi-arch images - Remove existing manifests before creating new ones - Add architecture annotations for proper platform detection - Ensures Docker pulls correct architecture automatically --- .gitea/workflows/buildpublish.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/buildpublish.yaml b/.gitea/workflows/buildpublish.yaml index 41a7584..84a2039 100644 --- a/.gitea/workflows/buildpublish.yaml +++ b/.gitea/workflows/buildpublish.yaml @@ -67,11 +67,22 @@ jobs: echo "Creating manifest for ${image_name}..." - # Create the manifest list using the architecture-specific digests + # Remove any existing manifest to ensure we create a fresh one + docker manifest rm gitea.jde.nz/public/${image_name}:latest 2>/dev/null || true + + # Create the manifest list using the architecture-specific images + # Note: publish.sh uses uname -m which gives x86_64 and aarch64 docker manifest create gitea.jde.nz/public/${image_name}:latest \ --amend gitea.jde.nz/public/${image_name}:latest-x86_64 \ --amend gitea.jde.nz/public/${image_name}:latest-aarch64 + # Annotate the manifests with the correct architecture + docker manifest annotate gitea.jde.nz/public/${image_name}:latest \ + gitea.jde.nz/public/${image_name}:latest-x86_64 --arch amd64 + + docker manifest annotate gitea.jde.nz/public/${image_name}:latest \ + gitea.jde.nz/public/${image_name}:latest-aarch64 --arch arm64 + # Push the manifest list docker manifest push gitea.jde.nz/public/${image_name}:latest