Add Docker image publish Github action - #97
Conversation
|
I pushed this branch to one of the same name for this repo, it generated https://hub.docker.com/layers/247489278/anacrolix/dms/add-docker-publish-image-action/images/sha256-3c9fdb05e699f5973870f248944b516f03d19fc982082793512674da0d166f88?context=repo. Looks good? Do I need to do anything to get it to generate previous tags, or does it just do it going forward? When I moved/merge this with master, I'm guessing a master image will be generated? |
|
The image looks good. I've done a cursory run on my PC, looks good. As soon as you merge it, For reference, check out my test image tags (pay attention to image hashes to see the same image pushed to multiple tags). |
|
@anacrolix Keep in mind that until a tagged version is pushed, the only usable image tag is $ docker run --rm -it anacrolix/dms
Unable to find image 'anacrolix/dms:latest' locally
docker: Error response from daemon: manifest for anacrolix/dms:latest not found: manifest unknown: manifest unknown.
See 'docker run --help'. |
|
I've just pushed v1.5.0. Let me know if it doesn't work out! |
Finally, I managed to solve #69 using Github Actions, no need to grant access to Docker Hub to your Github repos, since it will be Github which will build and push the image to DH. 🎉
Github Action requires
DOCKERHUB_USERNAMEandDOCKERHUB_TOKEN(generated on DH's security settings page) to be set in the Github secrets section in the repo config.Git pushes will trigger this Github Action to build Docker images and push them to Docker Hub:
branchnamepushesdms:branchnameimage tag. Thus,dms:masteracts as an edge/unreleased/HEAD image tag. Other branches push to their respective image tags (useful for testing feature branches),vX.Y.Xpush todms:X.Y.Z,dms:X.Y,dms:Xanddms:latest.:latesttag is the default if no tag specified, sodocker pull anacrolix/dmspulls latest released (stable) git tag.Also enabled Dependabot (only for Github Actions manifests). No need to toggle or configure anything.
Check out action runs and image tags from my testing on my repos.