Skip to content
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

ci: add image build #12573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

morremeyer
Copy link

@morremeyer morremeyer commented Jun 7, 2024

Description

This adds a Docker image build running in GitHub actions for linux/amd64 and linux/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 #8700 (comment) 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.

@CLAassistant
Copy link

CLAassistant commented Jun 7, 2024

CLA assistant check
All committers have signed the CLA.

@morremeyer morremeyer marked this pull request as draft June 7, 2024 11:42
@morremeyer morremeyer marked this pull request as ready for review June 7, 2024 12:51
@morremeyer
Copy link
Author

This is now ready for review, no more force-pushes here.

@bep
Copy link
Member

bep commented Jun 12, 2024

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create and publish official Docker images
3 participants