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