Make versions json dictionaries.
Strings don't seem to work.
This commit is contained in:
parent
4acfbf252a
commit
4ced03ad05
3 changed files with 3 additions and 3 deletions
|
@ -4,4 +4,4 @@ set -eu
|
||||||
|
|
||||||
[ -e /opt/resource/common ] && cd /opt/resource
|
[ -e /opt/resource/common ] && cd /opt/resource
|
||||||
. ./common
|
. ./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
2
src/in
|
@ -11,4 +11,4 @@ cd "$oci_dir"
|
||||||
tar cf "$1/image.tar" ./*
|
tar cf "$1/image.tar" ./*
|
||||||
cd - 1>&2
|
cd - 1>&2
|
||||||
|
|
||||||
echo "$(jq .version < "$INPUT_FILE")"
|
jq .version < "$INPUT_FILE"
|
||||||
|
|
2
src/out
2
src/out
|
@ -11,4 +11,4 @@ cd "$oci_dir"
|
||||||
tar xf "$1/$(jq -r .params.image < "$INPUT_FILE")"
|
tar xf "$1/$(jq -r .params.image < "$INPUT_FILE")"
|
||||||
cd - 1>&2
|
cd - 1>&2
|
||||||
crane push "$oci_dir" "$REPOSITORY:$TAG" --image-refs="$IMAGE_REFS_FILE"
|
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}'
|
||||||
|
|
Reference in a new issue