3 Commits

Author SHA1 Message Date
fd47216104 fix: correctly handle multi-line tag digests output
kaniko outputs each tag on a new line, so users that push multiple tags
at once would get an error as the output wasn't prepared to handle multi-line
text
2024-04-22 22:38:37 +02:00
8de7c88b27 chore(deps): update gcr.io/kaniko-project/executor docker tag to v1.21.1 2024-03-08 13:50:40 +01:00
ef9c4ca42e fix: entrypoint ARGS remove new line 2024-03-08 13:50:15 +01:00
2 changed files with 6 additions and 2 deletions

View File

@ -2,7 +2,7 @@ FROM alpine as certs
RUN apk --update add ca-certificates
FROM gcr.io/kaniko-project/executor:v1.20.0-debug
FROM gcr.io/kaniko-project/executor:v1.21.1-debug
SHELL ["/busybox/sh", "-c"]

View File

@ -94,13 +94,17 @@ EOF
# https://github.com/GoogleContainerTools/kaniko/issues/1803
# https://github.com/GoogleContainerTools/kaniko/issues/1349
export IFS=''
# Removes a trailing new line
ARGS=$(echo "${ARGS}" | sed 's/\n*$//')
kaniko_cmd="/kaniko/executor ${ARGS} --reproducible --force"
echo "Running kaniko command ${kaniko_cmd}"
eval "${kaniko_cmd}"
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
echo "digest=$(cat /kaniko/digest)" >> "$GITHUB_OUTPUT"
echo "image-tag-digest=$(cat /kaniko/image-tag-digest)" >> "$GITHUB_OUTPUT"
echo "image-tag-digest<<EOF" >>"$GITHUB_OUTPUT"
echo "$(cat /kaniko/image-tag-digest)" >>"$GITHUB_OUTPUT"
echo 'EOF' >>"$GITHUB_OUTPUT"
if [ -n "$INPUT_SKIP_UNCHANGED_DIGEST" ]; then