feat: add build argument for PACA_VERSION in Dockerfile and CD workflow - #337
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — wires the existing PACA_VERSION env var into the Docker build and CD pipeline so release images report their correct version tag.
- Add
ARG PACA_VERSION=dev/ENV PACA_VERSION=$PACA_VERSIONtoservices/api/Dockerfile— placed in the runtime stage (not build), since the version is read at startup rather than linked at compile time. - Pass
PACA_VERSION=${{ github.event.release.tag_name }}incd.yml— theapi-imagejob already runs only onrelease: published, so the tag is always defined.
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
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
PACA_VERSIONenv var (defaults todev), used by/api/versionto power the "new version available" banner — but nothing set it, so self-hosted images always reporteddev.ARG PACA_VERSION=dev/ENV PACA_VERSION=$PACA_VERSIONtoservices/api/Dockerfileso the value is baked into the image at build time.PACA_VERSION=${{ github.event.release.tag_name }}as a build-arg in theapi-imagejob ofcd.yml, so each published GitHub Release stamps its image with the matching tag (e.g.v1.2.3).Test plan
docker build --build-arg PACA_VERSION=v9.9.9-test .→ container reportsPACA_VERSION=v9.9.9-testdocker build .(no build-arg, as in local/dev) → container reportsPACA_VERSION=dev