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