Fix digest for additional tags, check if file is readable.
This commit is contained in:
parent
036520db92
commit
cee362238b
1 changed files with 4 additions and 1 deletions
5
src/out
5
src/out
|
@ -14,8 +14,11 @@ cd - 1>&2 2>/dev/null
|
||||||
crane push "$oci_dir" "$REPOSITORY:$TAG" --image-refs="$image_refs_file"
|
crane push "$oci_dir" "$REPOSITORY:$TAG" --image-refs="$image_refs_file"
|
||||||
additional_tags="$(jq -r .params.additional_tags < "$INPUT_FILE")"
|
additional_tags="$(jq -r .params.additional_tags < "$INPUT_FILE")"
|
||||||
if [ -n "$additional_tags" ]; then
|
if [ -n "$additional_tags" ]; then
|
||||||
|
if [ -r "$1/$additional_tags" ]; then
|
||||||
|
fail "cannot open file $1/$additional_tags"
|
||||||
|
fi
|
||||||
tr '[:space:]' '\n' < "$1/$additional_tags" | grep -v '^$' | while read -r tag; do
|
tr '[:space:]' '\n' < "$1/$additional_tags" | grep -v '^$' | while read -r tag; do
|
||||||
crane tag "$REPOSITORY:@$(cat "$image_refs_file")" "$tag"
|
crane tag "$REPOSITORY:@$(sed 's/^[^@]*@//' < "$image_refs_file")" "$tag"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Reference in a new issue