Open morremeyer opened 3 weeks ago
This is now ready for review, no more force-pushes here.
@morremeyer thanks for this. I just wanted to chime in and say that I have seen this, and it looks good. I just need to think about this, as I'm a little stretched for time, and 1) A setup like this will eventually have to be updated/fixed when GitHub changes its API etc. and 2) This will open the gate for people wanting a more advanced Docerfile
setup (e.g. Dart Sass, asciidoc etc. installs).
Description
This adds a Docker image build running in GitHub actions for
linux/amd64
andlinux/arm64
images.The build runs for every PR that changes either the workflow or the Dockerfile to verify the image still can be built correctly, but does not push the image for these runs.
For every tag, the images are built and pushed to the GitHub OCI registry.
Resolves #10760.
Testing
I have run tests with a slightly modified version (to enable testing) in my fork, see the test-add-image-build branch.
This builds the image with this workflow and results in the package being pushed to https://github.com/morremeyer/hugo/pkgs/container/hugo.
Continuous testing
I am aware of https://github.com/gohugoio/hugo/pull/8700#issuecomment-869981438 and happy to add automated testing of the images if there is a clear requirement for what should be tested.
However, as with the Dockerfile being a convenience, the same could also be applied to the resulting image in terms of guarantees.