Repository navigation
Publish the container image to GHCR instead of Docker Hub - #19
Merged
Merged
Conversation
The Docker Hub push had never run. It needed DOCKERHUB_USERNAME and DOCKERHUB_TOKEN as repository secrets, neither of which was ever configured, so the job failed at login the first time a release was dispatched and the image had always been pushed by hand instead. GHCR needs no stored secret: the automatic GITHUB_TOKEN authenticates, given the packages: write permission the job now declares. That matches how the NuGet package is already published, and leaves the repository with no required secrets at all. The image moves to ghcr.io/timmoth/fortitude-server. Anyone pulling aptacode/fortitude-server keeps the last hand-pushed image and will need to change the path; the README, the configuration and YAML guides, and the manual commands in NOTES.md all point at the new one. The registry prefix is written out rather than derived from github.repository_owner, because GHCR requires a lowercase path and the owner name is not.
Drops the -server suffix carried over from the Docker Hub name. Also updates the Aspire guide, which still showed AddProject<TProject>. That API is deprecated in Aspire 17 and the example AppHost moved off it, so the guide documented a call the sample no longer makes; the older form is kept as a note for anyone on Aspire 13.
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.
Fixes the
Error: Username and password requiredfrom the release run onmain.What happened
The Docker Hub job failed at
docker/login-action@v3becauseDOCKERHUB_USERNAMEandDOCKERHUB_TOKENwere never configured —gh secret listreturns nothing, so the repositoryhas no secrets at all. That job could never have succeeded; the image had always been pushed
by hand (see
NOTES.md). The NuGet half of the same run succeeded and publishedFortitude 10.1.4to GitHub Packages.The change
The image now goes to
ghcr.io/timmoth/fortitude, authenticated with the automaticGITHUB_TOKENplus apackages: writepermission on the job. This matches how the package isalready published and leaves the repository needing no secrets at all.
The registry path is written out rather than derived from
github.repository_owner, becauseGHCR requires a lowercase path and the owner name is not.
Breaking
Anyone pulling
aptacode/fortitude-serverkeeps the last hand-pushed image and must changethe path to
ghcr.io/timmoth/fortitude. The README,docs/configuration.md,docs/yaml-handlers.mdandNOTES.mdare updated, and the Docker Hub pull-count badge isreplaced with a link to the GHCR package.
Also in here
docs/aspire-integration-tests.mdstill showedAddProject<TProject>, which Aspire 17deprecates and the example AppHost moved off in #17 — so the guide documented a call the
sample no longer makes. Updated, with the older form kept as a note for anyone on Aspire 13.
After merging
The first release that pushes will create the GHCR package as private by default. It needs
to be made public once from its package settings page, or anonymous
docker pullwill 401.