libp2p-test-plans/transport-interop/dockerBuildWrapper.sh

18 lines
597 B
Bash
Raw Normal View History

#!/usr/bin/env /bin/bash
CACHING_OPTIONS=""
# If in CI and we have a defined cache bucket, use caching
2024-08-22 16:17:31 +02:00
# if [[ -n "${CI}" ]] && [[ -n "${AWS_BUCKET}" ]]; then
2024-08-22 16:15:20 +02:00
# CACHING_OPTIONS="\
# --cache-to type=s3,mode=max,bucket=$AWS_BUCKET,region=$AWS_REGION,prefix=buildCache,name=$IMAGE_NAME \
# --cache-from type=s3,mode=max,bucket=$AWS_BUCKET,region=$AWS_REGION,prefix=buildCache,name=$IMAGE_NAME"
2024-08-22 16:17:31 +02:00
# fi
2024-08-22 16:15:20 +02:00
CACHING_OPTIONS="\
--cache-to type=gha,mode=max \
--cache-from type=gha,mode=max"
docker buildx build \
--load \
-t $IMAGE_NAME $CACHING_OPTIONS "$@"