-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Setup COMMIT_SHA and COMMIT_DATE build args in the Docker image #2550
Conversation
Hello @brunoocasali! Since we have changed some parts of this CI for v0.28.0 (that are currently in Once it's rebased, I will be able to review it, currently, it's not because I have two contexts to consider when reviewing 😅 Thanks again!! |
No problem @curquiza let me know when you're ready :D |
Hello @brunoocasali! |
f9a13f5
to
6407b6d
Compare
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 @brunoocasali for the PR
First I would keep 2 separated jobs
- let the
Check tag format
-> this should only run forgithub.event_name != 'schedule'
- another new one, your
Build git metadata
-> this should run without any condition
Secondly, when I tried to run the CI by pushing a random tag (test-git-tag
) I got an error:
https://github.com/meilisearch/meilisearch/runs/7388047405?check_suite_focus=true
6407b6d
to
2867d2e
Compare
GitHub auto-closed my PR when I synced changes with my remote 🤷♂️ |
3212: Setup COMMIT_SHA and COMMIT_DATE build args in the Docker image r=curquiza a=brunoocasali GitHub auto-closed my PR when I synced changes with my remote 🤷♂️ #2550 The last PR #3205 were closed to help `@curquiza` test the CI. In any case, the summary of changes is quite similar: - Fix `git` usage from my last attempt (when you use `actions/checkout`) you get the `git` command to use. - Add the `build-args` definition from https://github.com/docker/build-push-action#inputs, which is supposed to work precisely as docker build `--build-arg`. Fixes #2028 The result will be like this: <img width="556" alt="image" src="https://user-images.githubusercontent.com/4116980/206019608-2713559a-1f58-4ff3-9fec-7720783993ac.png"> Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
Summary of the changes:
check-tag-format
tobuild-metadata
because now it does more than just check tag format (I was not sure about creating one step for just assigning a variable).build-args
definition from https://github.com/docker/build-push-action#inputs which is supposed to work exactly asdocker build --build-arg
.git
on line 34 because I don't know if it will be available at that point.Fixes #2028