👷(CI) add GHCR workflow for forked repo testing #1851
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
When I fork the project to make improvements, I want to be able to deploy it to my VPS for testing. I want an image built in a reproducible way. However, the current
docker-hub.ymlis hardcoded to push to Docker Hub underlasuiteregistry.This PR adds a GitHub Actions workflow that builds and pushes Docker images to GitHub Container Registry (GHCR) trigger. This enables forked repositories to build their own images for testing without requiring Docker Hub credentials or having to configure any credentials at all.
I created this workflow while fixing #1788 (submitted as PR #1850). To verify it works, I ran the workflow on my fork:
This generates the images in my account:
Now I can test it on my VPS by pointing my Docker Compose to my built image:
Proposal
.github/workflows/ghcr.ymlwithworkflow_dispatchtrigger, based on existingdocker-hub.ymlsuitenumerique/docsrepo.ghcr.io/{owner}/{repo}/{service}Notes:
External contributions
Thank you for your contribution! 🎉
Please ensure the following items are checked before submitting your pull request:
git commit --signoff(DCO compliance)git commit -S)<gitmoji>(type) title description## [Unreleased]section (if noticeable change)