|
|
@ -49,9 +49,25 @@ export def needs_update [] {
|
|
|
|
|
|
|
|
|
|
|
|
def print_needs_update [ntfy: bool] {
|
|
|
|
def print_needs_update [ntfy: bool] {
|
|
|
|
let data = $in
|
|
|
|
let data = $in
|
|
|
|
print $"Image `($data.Name)` needs to be updated."
|
|
|
|
let containers = ( containers_for_image $data.Name )
|
|
|
|
|
|
|
|
print $"Image `($data.Name)` needs to be updated. Used by ($containers | str join ', ')"
|
|
|
|
|
|
|
|
|
|
|
|
if $ntfy {
|
|
|
|
if $ntfy {
|
|
|
|
cntfy publish --tags [ podman $data.Name ] --priority 4 --title $"($data.Name) outdated" "updates" $"Container ($data.Name) needs to be updated."
|
|
|
|
(
|
|
|
|
|
|
|
|
cntfy publish
|
|
|
|
|
|
|
|
--tags [ podman $data.Name ]
|
|
|
|
|
|
|
|
--priority 4
|
|
|
|
|
|
|
|
--title $"($data.Name) outdated"
|
|
|
|
|
|
|
|
"updates" $"Container ($data.Name) needs to be updated. Used by ($data.Containers) containers. Used by: ( $containers | str join '\n' )"
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def containers_for_image [image: string] {
|
|
|
|
|
|
|
|
( podman container ls --all --format json
|
|
|
|
|
|
|
|
| from json
|
|
|
|
|
|
|
|
| where Image == $image
|
|
|
|
|
|
|
|
| insert Name {|$it| $it.Names? | get 0 }
|
|
|
|
|
|
|
|
| get Name
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|