-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve docker image release tag process #9407
base: master
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
.github/workflows/docker.yml
Outdated
tags: "${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ env.IMAGE_TAG }}" | ||
tags: | | ||
"${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ env.IMAGE_TAG }}" | ||
"${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only tag latest
for non-RC builds. So this should match on the env.IMAGE_TAG
to not contain .rc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a condition to check if that contains ".rc" and update tag with latest if "rc " is not found there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great update, and it definitely improves the tagging process by avoiding latest for RC builds. However, I think we should consider that .rc isn't the only type of non-official release we might encounter. For instance, there could be other non-stable or experimental tags like .beta, .alpha, or other custom suffixes.
Instead of relying on a "deny rule" (excluding .rc), I suggest we flip this logic and implement an "allow rule." This would validate that the version is strictly a raw semantic version, like v1.2.3, without any additional suffixes. This approach ensures latest is only applied to stable versions and avoids potential edge cases where other non-official tags might inadvertently get marked as latest.
What do you think? It would add some robustness to the tagging logic and better future-proof the pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried running this against my fork and got:
The template is not valid. .github/workflows/docker.yml (Line: 52, Col: 17): The following format string is invalid: {}/{}:latest
Also, can you please squash the commits into a single one?
@abhay084, remember to re-request review from reviewers when ready |
Change Description
Description of change / link to associated issue.
This PR is associated with this issue: #9397
Steps to Test
Steps for reviewers to follow to test the change.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.