Tag the image with a version only for releases #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/version-tag-releases-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #6, which I got wrong.
The version-tag job was gated on
version != commit. That is true only whilethe repository has no tags:
git describe --tags --alwaysthen returns theshort sha for both. After the first release tag it returns something like
v0.1.0-8-g3ec2839for every commit on main, so each one would have beenpublished as its own image tag and the package would fill up with noise.
The job now runs for
refs/tags/v*alone, which is what the README describes.The describe string still goes into the binary through the VERSION build arg —
that is where it earns its keep, because
wifipool-to-mqtt versionthen saysexactly which commit a running container came from.
Checked against the real repository rather than from memory: with a temporary
local tag eight commits back, describe returned
v0.1.0-8-g3ec2839on HEAD andv0.1.0on the tag itself.