-
Notifications
You must be signed in to change notification settings - Fork 175
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
docker build github action #508
base: master
Are you sure you want to change the base?
Conversation
Thanks for this PR. So I can fully understand what I'm looking at, can you help me with this portion:
Per docker hub, it's |
good catch on the image name miss-match. Use the shortened name. We/I can re-write it to only use If you want both docker hub and ghcr:
Just docker hub could be shortened to:
|
It would be cool to get the docker hub updated again. The PR follows along with the last example from GitHub docs. https://docs.github.com/en/actions/publishing-packages/publishing-docker-images so that may help with context. |
I did an experiment to confirm that you can publish correctly using a GitHub action. I used the example for just the docker hub - https://github.com/valeryan/mineos-node/blob/master/.github/workflows/dockerhub.yml. this one is set to trigger on publishing a release. And it was published to my account using my credentials. https://hub.docker.com/repository/docker/valeryan/mineos-docker/general. My Steps:
I will delete all that later but I figured it would be fun to see it work for myself and I have a new docker image to use for now that's not super outdated... |
This is a workflow that I have been using to build/publish docker images on github. To push to docker hub, you need to create a access token and set a DOCKERHUB_USERNAME and DOCKERHUB_TOKEN action secret.
On a PR to master, or if run manually from non master branch, this workflow will build the Dockerfile, but not push.
On any push to master, it will build, and publish to your github container registry, and docker hub
This will publish a image with the
latest
, 'master','master.commitsha' tags