fix: backup IFS

This commit is contained in:
ThetaDev
2024-03-03 00:23:36 +01:00
parent 464643883d
commit c3046f3baa

View File

@@ -5,6 +5,8 @@ if [ "$INPUT_DEBUG" = "true" ]; then
set -x
fi
OLDIFS=$IFS
REGISTRY="${INPUT_REGISTRY:-"docker.io"}"
IMAGE="$INPUT_IMAGE"
BRANCH=$(echo "$GITHUB_REF" | sed -E "s/refs\/(heads|tags)\///g" | sed -e "s/\//-/g")
@@ -74,9 +76,11 @@ crane auth login "$REGISTRY" -u "$USERNAME" -p "$PASSWORD"
runKaniko() {
# https://github.com/GoogleContainerTools/kaniko/issues/1803
# https://github.com/GoogleContainerTools/kaniko/issues/1349
IFS=''
kaniko_cmd="executor ${1} --reproducible --force"
echo "Running kaniko command: ${kaniko_cmd}"
IFS='' eval "${kaniko_cmd}"
eval "${kaniko_cmd}"
IFS=$OLDIFS
}
if [ -n "$INPUT_PLATFORMS" ]; then