From 612cded1b1919760a5aee9abac5376ef9c7f730b Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 21 Sep 2025 15:39:29 +1200 Subject: [PATCH] Fix manifest list creation for multi-arch Docker images - Remove existing manifests before creating new ones - Add architecture annotations for proper platform detection - Ensures Docker pulls correct architecture automatically - Matches fix applied to generic-docker-images --- .gitea/workflows/buildtestpublish.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/buildtestpublish.yaml b/.gitea/workflows/buildtestpublish.yaml index 51b62ca..3bddd88 100644 --- a/.gitea/workflows/buildtestpublish.yaml +++ b/.gitea/workflows/buildtestpublish.yaml @@ -58,14 +58,24 @@ jobs: - name: Create and push manifest list run: | # Only create manifest on main branch - if [ "$GITHUB_REF" = "refs/heads/main" ]; then - # Create the manifest list using the architecture-specific digests + if [ "$GITHUB_REF" = "refs/heads/main" ]; then + # Remove any existing manifest to ensure we create a fresh one + docker manifest rm gitea.jde.nz/public/simple-object-server:latest 2>/dev/null || true + + # Create the manifest list using the architecture-specific images docker manifest create gitea.jde.nz/public/simple-object-server:latest \ --amend gitea.jde.nz/public/simple-object-server:latest-x86_64 \ --amend gitea.jde.nz/public/simple-object-server:latest-aarch64 - + + # Annotate the manifests with the correct architecture + docker manifest annotate gitea.jde.nz/public/simple-object-server:latest \ + gitea.jde.nz/public/simple-object-server:latest-x86_64 --arch amd64 + + docker manifest annotate gitea.jde.nz/public/simple-object-server:latest \ + gitea.jde.nz/public/simple-object-server:latest-aarch64 --arch arm64 + # Push the manifest list docker manifest push gitea.jde.nz/public/simple-object-server:latest - + echo "Manifest list created and pushed successfully" fi