Skip to content

Commit

Permalink
Use latest if no tag is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Jul 17, 2021
1 parent c227e6e commit 86c726e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ get_token() {
IFS=: read base base_tag <<<$base
IFS=: read image image_tag <<<$image

digest_base=$(get_digest $base $base_tag)
digest_base=$(get_digest $base ${base_tag:-latest})
layers_base=$(get_layers $base $digest_base)

digest_image=$(get_digest $image $image_tag)
digest_image=$(get_digest $image ${image_tag:-latest})
layers_image=$(get_layers $image $digest_image)

jq '.base-.image | .!=[]' <<<"{\"base\": $layers_base, \"image\": $layers_image }"

0 comments on commit 86c726e

Please sign in to comment.