Fix release image tag#1365
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1365 +/- ##
==========================================
+ Coverage 43.76% 44.60% +0.84%
==========================================
Files 308 307 -1
Lines 33495 28318 -5177
==========================================
- Hits 14658 12632 -2026
+ Misses 17894 14930 -2964
+ Partials 943 756 -187
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Update the docker metadata step to find manually set tags. Add support to additionally tag the released image as latest. Detect if the pushed tag that triggered the release is the latest and tag the docker images accordingly.
9945c8f to
83a01c0
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the release and Docker publish workflows to correctly derive image tags when releases are triggered with a manually provided tag, and to optionally/applicably publish a latest tag for the most recent stable release.
Changes:
- Add a
latestboolean input to the release workflow for manual (workflow_dispatch) releases. - Introduce a
determine-latestjob to decide whether a given tag should also publish aslatest. - Update Docker metadata configuration in reusable publish workflows to emit semver-derived tags and conditionally add a
latesttag.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
Adds latest input + a job that determines whether the release tag should also publish latest, wiring that into downstream docker publish jobs. |
.github/workflows/publish_dockerhub_main.yml |
Adjusts docker/metadata-action configuration to use semver parsing from inputs.ref and optionally emit a latest tag. |
.github/workflows/publish_dockerhub_k8s_cache_main.yml |
Mirrors the main publish workflow tagging changes for the k8s cache image. |
Comments suppressed due to low confidence (4)
.github/workflows/publish_dockerhub_main.yml:80
- The tags configuration likely generates duplicate tags on release/tag runs:
type=semver,pattern=v{{version}},value=${{ inputs.ref }}will produce the same tag astype=ref,event=tagfor refs likev1.2.3. This redundancy can lead to duplicated-targuments later when creating the manifest (and makes the tagging logic harder to reason about). Consider dropping thetype=ref,event=tagentry (or otherwise ensuring tags are deduplicated).
tags: |
type=semver,pattern=v{{version}},value=${{ inputs.ref }}
type=raw,value=latest,enable=${{ inputs.latest == true }}
type=ref,event=branch
type=ref,event=tag
.github/workflows/publish_dockerhub_main.yml:156
- Same as earlier tags block:
type=ref,event=tagis redundant with the semver rule based oninputs.refand can cause duplicate tags to be emitted. Consider removing the tag-ref rule here as well to keep the manifest tagging deterministic.
tags: |
type=semver,pattern=v{{version}},value=${{ inputs.ref }}
type=raw,value=latest,enable=${{ inputs.latest == true }}
type=ref,event=branch
type=ref,event=tag
.github/workflows/publish_dockerhub_k8s_cache_main.yml:80
- The tags list likely produces duplicates for release/tag runs because the semver rule based on
inputs.refwill emit the same tag astype=ref,event=tag(e.g., both generatev1.2.3). Redundant tags can make downstream manifest creation/signing less deterministic; consider removingtype=ref,event=tagor ensuring tags are deduplicated.
tags: |
type=semver,pattern=v{{version}},value=${{ inputs.ref }}
type=raw,value=latest,enable=${{ inputs.latest == true }}
type=ref,event=branch
type=ref,event=tag
.github/workflows/publish_dockerhub_k8s_cache_main.yml:156
- Same duplication concern as the earlier metadata step:
type=ref,event=tagis redundant with the semver tag generated frominputs.refand may emit duplicate tags. Consider removing it here too.
tags: |
type=semver,pattern=v{{version}},value=${{ inputs.ref }}
type=raw,value=latest,enable=${{ inputs.latest == true }}
type=ref,event=branch
type=ref,event=tag
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related Documentation