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 CI: push vX.Y
tag (without patch) to DockerHub
#2507
Improve docker CI: push vX.Y
tag (without patch) to DockerHub
#2507
Conversation
Hello, This is my first time contributing to a large project like this! I hope I had understood the requirments described in #2497 correctly. I would grateful for any feedback regarding this. Thanks! |
Hello @janithpet thanks a lot for your contribution, I'll try to review this asap! 😄 |
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.
Thanks again for the PR. If I'm correct it will not work in the case of the tag does not finish by 0
.
@@ -37,6 +37,7 @@ jobs: | |||
flavor: latest=false | |||
tags: | | |||
type=ref,event=tag | |||
type=semver,pattern=v{{major}}.{{minor}},enable=${{ endsWith(github.ref_name, '.0') }} |
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.
As far as I understand, it will not work if I publish a tag name v0.27.2
because it does not end with .0
Could it be possible to create (maybe with a regexp?) this shorter Docker tag if the git tag finishes by .
and a number? In the best case, this number could be multiple digits, like v0.27.2
, but also v0.27.12
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.
You are right! I had misunderstood the requirements (sorry) -> I thought that it would only be needed if the patch ended with a .0
.
I have made a new commit that adds an additional workflow step that runs regex matching. It had to be done this way because, (as far as I understand), we can't run pattern matching in an expression.
The pattern I'm matching to is v<numbers>.<numbers>.<numbers>
, so that it doesn't catch tags that could look like v0.26.1-cloud-team.1
, which still end with .<number>
.
I tested these against a dummy repo.
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.
Thanks a lot for your reactivity! And the explanations!
vX.Y
tag (without patch) to DockerHub
Thanks a lot @janithpet for this PR! 😄 |
No problem at all! Please let me know if any issues come up 😃 |
* Create a docker tag without patch version if git tag has 0 patch version. * Create Docker tag without patch number if git tag follows v<number>.<number>.<number>
* Create a docker tag without patch version if git tag has 0 patch version. * Create Docker tag without patch number if git tag follows v<number>.<number>.<number> Add minor changes on CI
* Create a docker tag without patch version if git tag has 0 patch version. * Create Docker tag without patch number if git tag follows v<number>.<number>.<number> Add minor changes on CI
…ion.
Added a line that conditionally adds a version number without the patch version (i.e,
v<major>.<minor>
) if the version given by the git tag ends with.0
.Pull Request
What does this PR do?
Fixes #2497
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!