From d323eae3c3875962e98234f9cae1e307347fb453 Mon Sep 17 00:00:00 2001 From: redxef Date: Mon, 29 Aug 2022 20:03:56 +0200 Subject: [PATCH] Move `cd -` output to stderr. --- src/common | 2 -- src/in | 4 +++- src/out | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common b/src/common index 6c53f09..9d848b1 100755 --- a/src/common +++ b/src/common @@ -1,7 +1,5 @@ #!/usr/bin/env sh - - DEFAULT_DOMAIN=docker.io LEGACY_DEFAULT_DOMAIN=index.docker.io DOCKER_LOGIN_FILE_TMPL='{"auths": { "{{REGISTRY_URL}}": { "auth": "{{BASE64_UNAME_PW}}" }}}' diff --git a/src/in b/src/in index 74fad55..a70e2ad 100755 --- a/src/in +++ b/src/in @@ -7,6 +7,8 @@ set -eu oci_dir="$(mktemp -d)" crane pull --format=oci "$REPOSITORY:@$(jq -r .version "$INPUT_FILE")" "$oci_dir" -cd "$oci_dir" && tar cf "$1/image.tar" && cd - +cd "$oci_dir" +tar cf "$1/image.tar" ./* +cd - 1>&2 echo "$(jq -r .version < "$INPUT_FILE")" diff --git a/src/out b/src/out index c08cef1..916c74b 100755 --- a/src/out +++ b/src/out @@ -7,6 +7,8 @@ set -eu IMAGE_REFS_FILE="$(mktemp -t)" oci_dir="$(mktemp -d)" -cd "$oci_dir" && tar xf "$1/$(jq -r .params.image < "$INPUT_FILE")" && cd - +cd "$oci_dir" +tar xf "$1/$(jq -r .params.image < "$INPUT_FILE")" +cd - 1>&2 crane push "$oci_dir" "$REPOSITORY:$TAG" --image-refs="$IMAGE_REFS_FILE" sed 's/^[^@]*@//' < "$IMAGE_REFS_FILE"