Skip to content

Commit

Permalink
feat: eval cache_to parameter to allow to use variables (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumelecerf authored Oct 29, 2024
1 parent c0716ce commit 3b71943
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3b71943

Please sign in to comment.