From 3b71943cbcb24bcd373dbdad9e033d95d243d743 Mon Sep 17 00:00:00 2001 From: Guillaume Lecerf Date: Tue, 29 Oct 2024 16:01:21 +0100 Subject: [PATCH] feat: eval cache_to parameter to allow to use variables (#200) --- src/scripts/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/build.sh b/src/scripts/build.sh index 5aae559..df7c1e0 100644 --- a/src/scripts/build.sh +++ b/src/scripts/build.sh @@ -66,9 +66,11 @@ if [ -n "$PARAM_CACHE_FROM" ]; then fi if [ -n "$PARAM_CACHE_TO" ]; then + cache_to="$(eval echo $PARAM_CACHE_TO)" + docker buildx create --name cache --use docker buildx use cache - build_args+=("--cache-to=$PARAM_CACHE_TO" --load) + build_args+=("--cache-to=$cache_to" --load) fi # The context must be the last argument.