Move cd - output to stderr.

This commit is contained in:
redxef 2022-08-29 20:03:56 +02:00
parent a904dae38c
commit d323eae3c3
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921
3 changed files with 6 additions and 4 deletions

View file

@ -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}}" }}}'

4
src/in
View file

@ -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")"

View file

@ -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"