Hi, I think it might make sense to edit the behaviour of BUILDX_GIT_LABELS=1 to also add a label org.opencontainers.image.tag=<git_tagged_version>?
If it exists, a tag is more semantically useful than the commit hash IMO - I'd even make the argument that it should attempt to use the tag first, and then fall back to using the commit hash if it isn't present. It looks that there is already the Git.Tag function for retrieving the tag, so hopefully it wouldn't be too big a change.
Description
Hi, I think it might make sense to edit the behaviour of
BUILDX_GIT_LABELS=1
to also add a labelorg.opencontainers.image.tag=<git_tagged_version>
?If it exists, a tag is more semantically useful than the commit hash IMO - I'd even make the argument that it should attempt to use the tag first, and then fall back to using the commit hash if it isn't present. It looks that there is already the
Git.Tag
function for retrieving the tag, so hopefully it wouldn't be too big a change.