Skip to content

Publish the container image to GHCR instead of Docker Hub - #19

Merged
Timmoth merged 3 commits into
mainfrom
ci/publish-image-to-ghcr
Nov 20, 2026
Merged

Timmoth merged 3 commits into
mainfrom
ci/publish-image-to-ghcr

Conversation

@Timmoth

@Timmoth Timmoth commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Fixes the Error: Username and password required from the release run on main.

What happened

The Docker Hub job failed at docker/login-action@v3 because DOCKERHUB_USERNAME and
DOCKERHUB_TOKEN were never configured — gh secret list returns nothing, so the repository
has 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 published
Fortitude 10.1.4 to GitHub Packages.

The change

The image now goes to ghcr.io/timmoth/fortitude, authenticated with the automatic
GITHUB_TOKEN plus a packages: write permission on the job. This matches how the package is
already published and leaves the repository needing no secrets at all.

The registry path is written out rather than derived from github.repository_owner, because
GHCR requires a lowercase path and the owner name is not.

Breaking

Anyone pulling aptacode/fortitude-server keeps the last hand-pushed image and must change
the path to ghcr.io/timmoth/fortitude. The README, docs/configuration.md,
docs/yaml-handlers.md and NOTES.md are updated, and the Docker Hub pull-count badge is
replaced with a link to the GHCR package.

Also in here

docs/aspire-integration-tests.md still showed AddProject<TProject>, which Aspire 17
deprecates 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 pull will 401.

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.
@Timmoth
Timmoth merged commit f304645 into main Nov 20, 2026
2 checks passed
@Timmoth
Timmoth deleted the ci/publish-image-to-ghcr branch November 20, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant