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
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user