Fix manifest list creation for multi-arch Docker images
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 29s
Build-Test-Publish / build (linux/arm64) (push) Successful in 39s
Build-Test-Publish / create-manifest (push) Successful in 19s

- 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
This commit is contained in:
Your Name
2025-09-21 15:39:29 +12:00
parent 96ed3e0553
commit 612cded1b1

View File

@@ -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