1
0
Fork 0
mirror of https://github.com/aevea/action-kaniko.git synced 2025-04-20 09:08:14 +02:00

fix(kaniko): use eval in order to handle args containing spaces

This commit is contained in:
Idriss Neumann 2022-06-24 12:41:58 +01:00
parent 98644f9bae
commit 0c151452c1
No known key found for this signature in database
GPG key ID: 15FD501F7013EBA0

View file

@ -75,6 +75,9 @@ else
fi fi
fi fi
# https://github.com/GoogleContainerTools/kaniko/issues/1803
export IFS=''
export ARGS="$CACHE $CONTEXT $DOCKERFILE $TARGET $DESTINATION $INPUT_EXTRA_ARGS" export ARGS="$CACHE $CONTEXT $DOCKERFILE $TARGET $DESTINATION $INPUT_EXTRA_ARGS"
cat <<EOF >/kaniko/.docker/config.json cat <<EOF >/kaniko/.docker/config.json
@ -88,11 +91,11 @@ cat <<EOF >/kaniko/.docker/config.json
} }
EOF EOF
# https://github.com/GoogleContainerTools/kaniko/issues/1803
export IFS=''
# https://github.com/GoogleContainerTools/kaniko/issues/1349 # https://github.com/GoogleContainerTools/kaniko/issues/1349
/kaniko/executor --reproducible --force $ARGS # https://github.com/GoogleContainerTools/kaniko/issues/1803
kaniko_cmd="/kaniko/executor ${ARGS} --reproducible --force"
echo "Running kaniko command ${kaniko_cmd}"
eval "${kaniko_cmd}"
if [ ! -z $INPUT_SKIP_UNCHANGED_DIGEST ]; then if [ ! -z $INPUT_SKIP_UNCHANGED_DIGEST ]; then
export DIGEST=$(cat digest) export DIGEST=$(cat digest)