ktistec
ktistec copied to clipboard
Build and push docker images with Github Actions
This will have Github Actions build and push docker images to toddsundsted/ktistec:latest
every time you update the main
branch. If you'd like, I can make it push tags to toddsundsted/ktistec:<tagname>
instead / in addition.
To make this work, you'll have to:
- create a docker hub token by going to https://hub.docker.com/settings/security
- create
DOCKERHUB_USERNAME
andDOCKERHUB_TOKEN
secrets at https://github.com/toddsundsted/ktistec/settings/secrets/actions
thanks! this is great! i'm reviewing it now.
the only hold up is "shards update". i'd like dependencies to be fixed in a release—shards update changes them. it looks like, however, something happened to the backtracer shard. i'd like to address that specifically, if possible, rather just work around it with an update.
I've removed the shards update
from this branch, and also made it so it pushes to ${{ secrets.DOCKERHUB_USERNAME }}/ktistec
instead of hard-coding toddsundsted/ktistec
, so that forks can push to their own docker hub namespace.
I'm realizing that my latest built docker image still doesn't have the latest code (so I'm still hitting #21), because the Dockerfile clones the dist
branch (which hasn't been updated with the fix for #21.)
RUN git clone --branch ${version:-dist} --depth 1 https://github.com/toddsundsted/ktistec .
It seems to me like it would be more idiomatic to use ADD . /build/
and RUN npm run build
. This would ensure that the docker image produced always reflects the version of the code that's used to build it.