Tag :latest only for the newest released version#2607
Open
fnando wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Docker GitHub Actions workflow to ensure the :latest Docker tag is only pushed when building the highest released vX.Y.Z version tag, preventing older backport releases from overwriting :latest.
Changes:
- Fetch Git tags during the source checkout so the workflow can compare against available version tags.
- Compute the highest released
vX.Y.Ztag and only include:latestwhen building that highest version; otherwise push only the versioned tag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Docker workflow now pushes the
:latesttag only when the version being built is the highest releasedvX.Y.Ztag. Building an older version tag publishes its versioned tag but leaves:latestuntouched. The source checkout also fetches tags so the comparison has the full tag list.Why
:latestwas pushed for any ref matchingvX.Y.Z, with no version comparison. Releasing a back-port or re-running an older version tag (e.g. a 25.x patch after 26.x shipped) would clobber:latestto point at the older release. This guard ensures:latestonly ever advances to the newest version.Known limitations
N/A