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
Build and push images with Github Actions to DockerHub #68
Conversation
@martialblog Please add your DockerHub username and password as "secrets" to the Github repository. Then you can test the "Login to DockerHub" step and enable the "push: true" option. Feel free to push directly on this branch. |
@jacksgt 🥇 MVP Award I just added an access token as env secret. Not sure about the namespace yet, haven't workend too much with GitHub Actions. We can change that later. |
The 3.* is LTS so we need that. 4.* is replaces by 5.* completely as far as I known |
What I currently imagine for the CI is this:
|
Yes, I think that sounds good and feasible. |
References: * https://docs.github.com/en/actions/guides/publishing-docker-images * https://github.com/docker/build-push-action/blob/master/docs/advanced/tags-labels.md * https://github.com/docker/metadata-action Note: docker / buildx does not support '+' in the image tag name. > invalid tag "martialblog/limesurvey:0.0.0+test5-apache": invalid reference format Use underscores instead, like the images already have on Dockerhub.
Okay, I think we are ready to go here. I squashed the commits and cleaned up the TODOs. |
Yeah sure, we can just delete it afterwards |
I agree on the scope-creep, but before we merge... can be set this up so that the build phase and the push phase are two workflows. That way be can plug in the structure-tests and cve-scans later |
Hooraayy! FYI @martialblog Images will now need to be tagged like |
That's ok, we just need to update the README accordingly |
Build and push (5.x) images with Github Actions to DockerHub.
4.x and 3.x images can be added by creating another workflow for them.
Also, as the comments indicate, the images can easily be pushed to both DockerHub and GHCR (from the same build).
References:
Note: docker / buildx does not support '+' in the image tag name.
Use underscores instead, like the images already have on Dockerhub