|
|
|
@ -29,12 +29,18 @@ export def needs_update [] {
|
|
|
|
|
let data = $in
|
|
|
|
|
let name_parts = ( $data.Name | split row "/" --number 2 )
|
|
|
|
|
let registry = ( $name_parts | first )
|
|
|
|
|
let image = ( $name_parts | last | split row ":" | get 0 )
|
|
|
|
|
let img_parts = ( $name_parts | last | split row ":" )
|
|
|
|
|
let image = ( $img_parts | get 0 )
|
|
|
|
|
let tag = ( $img_parts | get 1 )
|
|
|
|
|
let digest = $data.Id
|
|
|
|
|
print $"Checking if ($image) has updates on ($registry)"
|
|
|
|
|
print $"Checking if ($image):($tag) has updates on ($registry)"
|
|
|
|
|
|
|
|
|
|
if $registry == "docker.io" {
|
|
|
|
|
( dockerhub get_image_digest $image ) != $digest
|
|
|
|
|
try {
|
|
|
|
|
( dockerhub get_image_digest $image $tag ) != $digest
|
|
|
|
|
} catch {
|
|
|
|
|
false
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
print $"Host ($registry) is not supported"
|
|
|
|
|
false
|
|
|
|
|