Commit 9f887eb
fix(build): tag images by version and major.minor instead of latest (#632)
Every v* tag pushed :latest, so a patch released on an older line or
a pre-release tag would move it backwards. Rather than making :latest
smarter, drop it: before 1.0 every minor is allowed to break
compatibility, so a floating latest silently carries consumers across
compatibility boundaries. A moving {{major}}.{{minor}} tag lands
exactly on that boundary in 0.x and serves the same purpose.
Tags now come from docker/metadata-action with {{version}} and
{{major}}.{{minor}}. flavor: latest=false is required because the
action would otherwise add latest on its own, its default being
latest=auto. Nothing has to consult the rest of the tag history: a
patch published on an older line moves only its own line, and
pre-releases only ever extend {{version}}, never a moving tag.
The labels output is wired through as well, since
org.opencontainers.image.source is what links the GHCR package back
to this repository.
Note that {{version}} strips the v prefix, so images are tagged
:0.3.0 rather than :v0.3.0. No release has been cut since #631, so
nothing already published is affected.
Signed-off-by: YR Chen <stevapple@icloud.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent e1de618 commit 9f887eb
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
| |||
163 | 173 | | |
164 | 174 | | |
165 | 175 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 176 | + | |
| 177 | + | |
169 | 178 | | |
170 | 179 | | |
171 | 180 | | |
| |||
0 commit comments