1
0
Fork 0
mirror of https://github.com/aevea/action-kaniko.git synced 2025-04-19 16:58:13 +02:00

fix: long base64 string may contain new-line

if the base64 string has more than 76 characters, it is wrapped with \n
This commit is contained in:
Dmitry Tsoy 2021-04-16 14:02:59 +03:00
parent 49888d43ab
commit 7fb88ce8a9
No known key found for this signature in database
GPG key ID: 2D2B25523D51E635

View file

@ -89,7 +89,7 @@ if [ ! -z $INPUT_SKIP_UNCHANGED_DIGEST ]; then
export DIGEST=$(cat digest)
if [ "$REGISTRY" == "docker.pkg.github.com" ]; then
wget -q -O manifest --header "Authorization: Basic $(echo -n $USERNAME:$PASSWORD | base64)" https://docker.pkg.github.com/v2/$REPOSITORY/manifests/latest || true
wget -q -O manifest --header "Authorization: Basic $(echo -n $USERNAME:$PASSWORD | base64 | tr -d \\n)" https://docker.pkg.github.com/v2/$REPOSITORY/manifests/latest || true
export REMOTE="sha256:$(cat manifest | sha256sum | awk '{ print $1 }')"
else
export REMOTE=$(reg digest -u $USERNAME -p $PASSWORD $REGISTRY/$REPOSITORY | tail -1)