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

Closed
wants to merge 1 commit into from
Closed

Conversation

morremeyer
Copy link
Contributor

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

@phantasy36
Copy link

现在已经准备好进行审查了,这里不再有强制推动。

What is the name of the repository to pull?

@bep bep added this to the v0.132.0 milestone Aug 9, 2024
@bep
Copy link
Member

bep commented Aug 9, 2024

Sorry for the delay; I'm going to test and complete this in #12734.

@bep bep closed this Aug 9, 2024
@morremeyer morremeyer deleted the ci/add-image-build branch August 9, 2024 17:14
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
5 participants