ci(github): publish the Docker image to GHCR on release - #482
Merged
Conversation
- Add `publish-docker-image` to `tag-release.yml`, gated on `tag-and-release` succeeding, so a Docker image is only published for a commit that was actually tagged and released. - Builds `Dockerfile` at the same merge commit, `linux/amd64` only, `APP_VERSION` build-arg matching the local `DockerBuild` target, GHA layer caching. - Smoke tests the image (demo `GENPRES_URL_ID`, random throwaway password, `/` must return 200 within 60s) before pushing — verified locally against a real build, not just in CI. - Pushes `ghcr.io/informedica/genpres:<version>`, plus `:latest` only on a stable (non-pre-release) version. GHCR is interim pending the `informedica` Docker Hub account (see issue thread); the registry is a single `IMAGE_NAME` env var so switching later is a small change. - Amends ADR-0021 with the decisions table, updates DEVELOPMENT.md's Release Automation section, adds a design-history change log entry. ## Follow-up needed after merge (not automatable) - **Package visibility**: the first push creates the GHCR package as private under `informedica`. Someone with org admin rights needs to set `informedica/genpres` public in GitHub package settings, or the image is unpullable without a token. - `Build.fs`'s local `DockerBuild` default (`halcwb/genpres`) is unchanged in this PR — separate decision. ## Test plan - [x] Built `Dockerfile` locally with the same `APP_VERSION` build-arg the workflow uses; build succeeded. - [x] Ran the built image with the demo `GENPRES_URL_ID` and a random password; `/` returned 200 on first poll, confirming the smoke-test step's assumptions (port 8085, startup timing). - [ ] First real run of `publish-docker-image` on the next release PR merge (cannot be dry-run outside GitHub Actions). Closes informedica#234 item 3, addresses informedica#459.
Contributor
Greptile SummaryThe PR adds a release-gated job that builds, smoke-tests, and publishes an amd64 GenPRES image to GHCR, with
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking compatibility gap for future releases that use SemVer build metadata. The current version format follows the successful path, but a supported Files Needing Attention: .github/workflows/tag-release.yml Important Files Changed
Sequence DiagramsequenceDiagram
participant R as Release PR merge
participant T as tag-and-release
participant D as publish-docker-image
participant G as GHCR
R->>T: Closed and merged release/master PR
T->>T: Validate version and release notes
T->>T: Create Git tag and GitHub Release
T-->>D: version, tag, prerelease
D->>D: Check out merge commit
D->>D: Build amd64 image
D->>D: Run container and smoke-test /
alt Smoke test succeeds
D->>G: Push version tag
opt Stable release
D->>G: Push latest tag
end
else Smoke test fails
D-->>D: Stop before push
end
Reviews (1): Last reviewed commit: "ci(github): publish the Docker image to ..." | Re-trigger Greptile |
Versioning.fsx's isPreRelease already tolerates SemVer build metadata in <Version> (a `+build.N` suffix), even though no release has shipped one yet. Docker tags reject `+` outright, so a version like `1.0.0+build.7` would flow straight into `$IMAGE_NAME:$VERSION`, and the Git tag and GitHub Release for that version would already exist by the time `docker build` rejected the tag as invalid. Fold `+` to `-` once, in the Determine image tags step, and expose the result as its own version_tag output. The smoke test step now reads that output instead of rebuilding a tag from the raw version, which was quietly wrong the same way: it would have run against a tag docker never actually built. Caught by Greptile's review of informedica#482. ADR-0021's Tags pushed row and DEVELOPMENT.md's publish-docker-image steps note why the fold exists. Refs informedica#459
halcwb
approved these changes
Aug 25, 2026
halcwb
pushed a commit
that referenced
this pull request
Aug 26, 2026
DockerBuild/DockerRun still defaulted to halcwb/genpres, left over from before #459/#482 wired up GHCR publishing on release. Align the local default with what tag-release.yml publishes so a plain `dotnet run DockerBuild` produces the same image name as CI. Update the DEVELOPMENT.md references to match.
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.
publish-docker-imagetotag-release.yml, gated ontag-and-releasesucceeding, so a Docker image is only published for a commit that was actually tagged and released.Dockerfileat the same merge commit,linux/amd64only,APP_VERSIONbuild-arg matching the localDockerBuildtarget, GHA layer caching.GENPRES_URL_ID, random throwaway password,/must return 200 within 60s) before pushing — verified locally against a real build, not just in CI.ghcr.io/informedica/genpres:<version>, plus:latestonly on a stable (non-pre-release) version. GHCR is interim pending theinformedicaDocker Hub account (see issue thread); the registry is a singleIMAGE_NAMEenv var so switching later is a small change.Follow-up needed after merge (not automatable)
informedica. Someone with org admin rights needs to setinformedica/genprespublic in GitHub package settings, or the image is unpullable without a token.Build.fs's localDockerBuilddefault (halcwb/genpres) is unchanged in this PR — separate decision.Test plan
Dockerfilelocally with the sameAPP_VERSIONbuild-arg the workflow uses; build succeeded.GENPRES_URL_IDand a random password;/returned 200 on first poll, confirming the smoke-test step's assumptions (port 8085, startup timing).publish-docker-imageon the next release PR merge (cannot be dry-run outside GitHub Actions).Closes #234 item 3, addresses #459.