lilydjwg / nvchecker

New version checker for software releases
MIT License
439 stars 70 forks source link

container source plugin supports watching update of a specified tag #243

Closed bianjp closed 1 year ago

bianjp commented 1 year ago

This PR extends the container source plugin to support watching update of a specified tag.

Previously the container parameter can only be image_path, now it will also accept image_path:tag. If no tag is given, the plugin's behavior is the same as before.

When watching for a specified tag, the tag's version is the update time of the tag. Single image tag itself does not have any update time, we take the creation time of the image ID referred by the tag. Theoretically speaking the creation time is not 100% reliable but in practice it is acceptable and more readable than image ID.

Sample config:

# watch the latest tag
[oraclelinux]
source = "container"
container = "library/oraclelinux"

# watch the update of oraclelinux:8 tag
[oraclelinux-8]
source = "container"
container = "library/oraclelinux:8"

Resolve #241

yan12125 commented 1 year ago

Thanks! I'm not sure if it will be confusing to return different data types with different configurations, though.

lilydjwg commented 1 year ago

if it will be confusing to return different data types with different configurations, though.

It's already happening, e.g. for those git-hosting sites.

yan12125 commented 1 year ago

Oh you're right. Indeed I was once confused by cases like use_latest_release and use_max_tag in the github source.