Trying to upload build_cache image with oci-mediatypes=true. Reason: without this option, the image size and manifest are not displayed on Gitlab. Trying to see if this option will fix the issue.

This commit is contained in:
2023-03-22 12:40:58 +08:00
parent de51c65c47
commit 74cd35ab17

View File

@@ -18,7 +18,7 @@ then
-t $CI_REGISTRY_IMAGE:$UBUNTU_VER \ -t $CI_REGISTRY_IMAGE:$UBUNTU_VER \
--platform $PLATFORMS \ --platform $PLATFORMS \
--cache-from type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache \ --cache-from type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache \
--cache-to type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache,mode=max \ --cache-to type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache,mode=max,oci-mediatypes=true \
--push --provenance false --push --provenance false
else else
docker buildx build . \ docker buildx build . \
@@ -30,7 +30,7 @@ else
-t $CI_REGISTRY_IMAGE:latest \ -t $CI_REGISTRY_IMAGE:latest \
--platform $PLATFORMS \ --platform $PLATFORMS \
--cache-from type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache \ --cache-from type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache \
--cache-to type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache,mode=max \ --cache-to type=registry,ref=$CI_REGISTRY_IMAGE/ubuntu-$UBUNTU_VER:cache,mode=max,oci-mediatypes=true \
--push --provenance false --push --provenance false
fi fi