Make versions json dictionaries.

Strings don't seem to work.
This commit is contained in:
redxef 2022-08-29 20:53:49 +02:00
parent 4acfbf252a
commit 4ced03ad05
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921
3 changed files with 3 additions and 3 deletions

View file

@ -4,4 +4,4 @@ set -eu
[ -e /opt/resource/common ] && cd /opt/resource
. ./common
jq --null-input --arg version "$(crane digest "$REPOSITORY:$TAG")" '[$version]'
jq --null-input --arg version "$(crane digest "$REPOSITORY:$TAG")" '[{"digest": $version}]'

2
src/in
View file

@ -11,4 +11,4 @@ cd "$oci_dir"
tar cf "$1/image.tar" ./*
cd - 1>&2
echo "$(jq .version < "$INPUT_FILE")"
jq .version < "$INPUT_FILE"

View file

@ -11,4 +11,4 @@ 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"
jq --null-input --arg version "$(sed 's/^[^@]*@//' < "$IMAGE_REFS_FILE")" '$version'
jq --null-input --arg version "$(sed 's/^[^@]*@//' < "$IMAGE_REFS_FILE")" '{"digest": $version}'