Fix manifest list creation for multi-arch images
All checks were successful
Build-Publish-Multi-Arch / build (linux/amd64) (push) Successful in 11s
Build-Publish-Multi-Arch / build (linux/arm64) (push) Successful in 12s
Build-Publish-Multi-Arch / create-manifest (push) Successful in 15s

- Remove existing manifests before creating new ones
- Add architecture annotations for proper platform detection
- Ensures Docker pulls correct architecture automatically
This commit is contained in:
Your Name
2025-09-21 15:37:33 +12:00
parent 1ef17c650d
commit 943172e8e0

View File

@@ -67,11 +67,22 @@ jobs:
echo "Creating manifest for ${image_name}..." 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 \ 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-x86_64 \
--amend gitea.jde.nz/public/${image_name}:latest-aarch64 --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 # Push the manifest list
docker manifest push gitea.jde.nz/public/${image_name}:latest docker manifest push gitea.jde.nz/public/${image_name}:latest