ci: Add GitHub Container Registry (ghcr.io) publishing#151
Open
terafin wants to merge 1 commit into
Open
Conversation
59d97a2 to
9acf04d
Compare
terafin
added a commit
to intarweb/docker-autoheal
that referenced
this pull request
Jun 6, 2026
Replaces single-branch Model A with the canonical Model B pattern: - main stays upstream-clean (rebased daily onto upstream/main). - dev is the deploy track, auto-regenerated each sync run as main + cherry-pick of every open intarweb→upstream PR's commits. - build-from-source.yml now fires on push to [main, dev] and only promotes :latest when github.ref == refs/heads/dev. - FORK_INFO.md updated to reflect Model B + auto-regen semantics and the PR willfarrell#151 patch row. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds GitHub Container Registry (ghcr.io) as an additional publishing target alongside Docker Hub.
Motivation
Docker Hub's rate limiting (100 pulls/6hrs anonymous, 200 free) increasingly impacts CI/CD and self-hosted infrastructure. ghcr.io provides no rate limits for public images, a unified code+containers ecosystem, needs no extra secrets (uses the existing GITHUB_TOKEN), and reuses the same build — just an additional registry target.
Changes
In
.github/workflows/github-build.yml(jobmulti):permissions:block withcontents: readandpackages: writeso the job can push to ghcr.io.${{ github.actor }}and${{ secrets.GITHUB_TOKEN }}.latestfor main,{version}for tags), added a parallelghcr_tagenv var (ghcr.io/${{ github.repository }}:latest/:{version}) mirroring the existing Docker Hub tag strategy.${{ env.ghcr_tag }}to thetags:list of the existing Build and push step.No changes to build args, context, platforms/multi-arch, cache, or the existing Docker Hub tags.
Backward Compatibility
Fully backward compatible — Docker Hub publishing is unchanged; this only adds an additional registry target.
Testing
🤖 Generated with Claude Code
🔧 One-time maintainer step: make the GHCR package public
Heads-up for maintainers: the first time this workflow publishes to
ghcr.io/willfarrell/docker-autoheal, GitHub creates the package as private by default. To let usersdocker pullit without authentication, a maintainer needs to set its visibility to Public once:It's a one-time action — subsequent pushes inherit the setting. (Flagged by an automated reviewer; surfacing it here so the rollout is smooth.)