Publish multi-arch Docker image to GHCR and Docker Hub - #8
Merged
Merged
Conversation
Adds a publish workflow that tests, builds amd64/arm64 natively, merges a multi-arch manifest on GHCR and mirrors it to Docker Hub when credentials are set. docker-compose.yml now pulls the published image so Portainer stacks and curl'd compose files need no clone; docker-compose.override.yml keeps building from source in a repo checkout. Data paths are baked into the image so a bare docker run writes to the mounted volumes.
This was referenced Sep 15, 2026
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.
What does this change?
Adds
.github/workflows/docker-publish.yml. On every push tomain, onv*.*.*tags and on manual runs, it runs typecheck and tests. Then it buildslinux/amd64andlinux/arm64on native runners, pushes them by digest and merges them into one multi-arch manifest onghcr.io/lucifix/model-workshop-manager. IfDOCKERHUB_USERNAME/DOCKERHUB_TOKENsecrets are set, that manifest is copied to Docker Hub without a second build.maingetlatestandsha-xxxxxxx. Release tagsvX.Y.ZgetX.Y.Z,X.YandX, and never movelatest.docker-compose.ymlnow pulls the published image (APP_IMAGE_TAG, defaults tolatest), so a Portainer stack or a curl'd compose file works without cloning the repo.docker-compose.override.ymlis picked up automatically in a repo clone and addsbuild:, sodocker compose up -d --buildstill builds from source.Dockerfilenow setsDATABASE_URL,DATA_DIR,UPLOAD_DIRandBACKUP_DIRto the mounted paths. The app's own defaults are relative paths, so a baredocker runwould otherwise write data into the container instead of the volume.APP_IMAGE_TAGadded to the env table.Reviewer notes / known follow-ups
The pre-PR review found these; none are fixed in this PR:
workshop-datavolume has noname:, butdocker-compose.ymlpins one. Switching between the two gives you a different, empty volume.mainproduces no tags, so the merge step fails.--buildgets the same name as the published:latest, so a pull and a build overwrite each other.DOCKERHUB_USERNAMEas-is, so the secret must be lowercase.Related issue
None.
Checklist
npm run lint:fixandnpm run fmtat the repo root (fmt:checkpasses)npm run typecheckandnpm run buildpass: not run locally, no app code changedScreenshots
n/a