-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: Add git flow to make docker image #157
Conversation
.github/workflows/docker-publish.yml
Outdated
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c |
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.
Is there any reason why use a specific commit hash instead of the semver docker/login-action@v1
?
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.
This is an automatically generated hash.
I will test it after changing it to the latest version!
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 updated current tag and the test result was successful in upload the git package.
Thank you review.
RUN make clean && make build | ||
|
||
# Get 'libwasmvm.so' from wasmvm | ||
RUN git clone -b v0.14.0 https://github.com/CosmWasm/wasmvm.git /src/wasmvm |
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.
Yeah. There's no other way to get libwasmvm.so
because CosmWasm/wasmvm
is indirectly referred by panacea-core
(The panacea-core
refers to CosmWasm/wasmd
which refers to CosmWasm/wasmvm
).
Now, we must keep in mind that the version of wasmvm
must be always updated whenever we update the wasmd
(in the go.mod
).
Btw, I just found that the wasmvm
also provides a libwasmvm_muslc.a
for Alpine Linux.
https://github.com/CosmWasm/wasmd/blob/d2e35c249e39e90c5a85e03e0b75800431612b20/Dockerfile#L18
It would be better to use that, but not for now because that's a static library (not a shared library). It means that we have to change our Makefile to build the panacead
with the static library. So, let's do it later. For now, your strategy is good enough.
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.
OK!
RUN make clean && make build | ||
|
||
# Get 'libwasmvm.so' from wasmvm | ||
RUN git clone -b v0.14.0 https://github.com/CosmWasm/wasmvm.git /src/wasmvm |
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.
It is same version used by wasmd(v0.17.0)
If change the wasmd version, wasmvm version needs to be update too.
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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.
Aha. I got it.
To check if I understood it correctly, the docker image will be pushed:
- When the
master
branch is updated, an image is pushed with the tagmaster
. - Or,
- When the
vX.Y.Z
git tag is created, an image is pushed with the tagvX.Y.Z
and thelatest
docker tag is updated.
Is it right?
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.
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.
LGTM 👍
When master branch changed and add new tag then build docker image and publish git package.
There were a few things to consider.
libwasmvm.so
library