ci(publish): build versioned release images on v* tags#60
Conversation
Pushing a v* tag now builds and pushes semver-tagged images for both the backend and UI packages (:1.2.3, :1.2, :1, and :latest), so releases have an immutable, pinnable artifact instead of only the rolling :main. The bare major tag (:1) appears from v1.0.0 onward (metadata-action skips :0 during 0.x).
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} |
There was a problem hiding this comment.
Pre-Releases Move Stable Aliases
When a tag like v1.2.3-beta.1 is pushed, these semver patterns still emit :1.2 and :1 for the backend image, while the default metadata flavor also emits :latest. That moves stable-looking aliases from the last stable release to a pre-release container, so users pinned to :1, :1.2, or :latest can receive beta or rc code.
| type=semver,pattern={{major}}.{{minor}} | ||
| type=semver,pattern={{major}} |
There was a problem hiding this comment.
The UI image uses the same semver alias patterns, so a pre-release tag like v1.2.3-beta.1 can publish ghcr.io/${{ github.repository }}-ui:1.2, :1, and :latest. Consumers of the stable UI image aliases can be switched to an unstable release image without changing their pin.
| - main | ||
| # Version tags (e.g. v1.2.3) cut release images: :1.2.3, :1.2, :1 (and :latest). | ||
| tags: | ||
| - 'v*' |
There was a problem hiding this comment.
Broad Tag Glob Starts Empty Pushes
This trigger matches any tag beginning with v, but the only tag rules added for tag events are semver rules. If someone pushes a matching non-semver tag such as v1, vtest, or v2024.01.01, the workflow runs, branch and PR rules emit no tag, semver rules emit no tag, and the build-push steps run with an empty tag list.
Summary
Pushing a
v*tag now builds and pushes semver-tagged Docker images for both packages (jackandjack-ui), so releases have an immutable, pinnable artifact instead of only the rolling:main.On a
v1.2.3tag,docker/metadata-actionemits::1.2.3,:1.2,:1, and:latest:main(branch pushes) and:pr-<n>(PRs) are unchanged.Notes
:1) only appears fromv1.0.0onward —metadata-actionskips:0during0.x.vprefix), per the usual convention.Why now
Needed before cutting a tagged release:
create-release.ymlalready fires onv*(Release + changelog), butpublish.ymlpreviously only built:main/:pr-<n>, so a tag produced no versioned image.Greptile Summary
This PR adds release-image publishing for version tags. The main changes are:
publish.ymlnow runs on pushedv*tags.Confidence Score: 4/5
The tag publishing path can move stable image aliases to pre-release builds.
:latest, major, and minor aliases for both images.v*trigger can start a publish run that has no Docker tags to push..github/workflows/publish.yml
Reviews (1): Last reviewed commit: "ci(publish): build versioned release ima..." | Re-trigger Greptile