Fix checksum comparison

main
trivernis 1 year ago
parent d3d7659bca
commit 6aeed20dbf
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -10,6 +10,8 @@ export def get_image_digest [image: string] {
| from json | from json
| get config | get config
| get digest | get digest
| split row ":"
| get 1
) )
} }

@ -30,10 +30,10 @@ export def needs_update [] {
let name_parts = ( $data.Name | split row "/" --number 2 ) let name_parts = ( $data.Name | split row "/" --number 2 )
let host = ( $name_parts | first ) let host = ( $name_parts | first )
let image = ( $name_parts | last | split row ":" | get 0 ) let image = ( $name_parts | last | split row ":" | get 0 )
let digest = $data.Digest let digest = $data.Id
if $host == "docker.io/" { if $host == "docker.io" {
( dockerhub get_image_digest $image ) == digest ( dockerhub get_image_digest $image ) != $digest
} else { } else {
false false
} }

Loading…
Cancel
Save