fix(ci): embed commit hash in OCI build (footer no longer 'unknown') #72
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/ci-embed-git-sha"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The SPA version footer showed git hash
unknownon staging.Cause
build.rsderives the hash viagit rev-parse, but the OCI image build context has no.git, so it fell back tounknown. CI already passes--build-arg GIT_SHA=$GITHUB_SHA, but only the final (image-label) stage declaredARG GIT_SHA; the builder stage wheredx buildruns never saw it.Fix
ARG GIT_SHAin the builder stage and export it as an env sobuild.rscan read it.build.rsnow prefersGIT_SHA(shortened to 12 chars), falling back togit rev-parsefor local/dev builds.Build date already resolved via
datein the builder, so only the hash needed wiring. No workflow change needed (the build-arg was already passed). The OCI build workflow on this PR validates the Dockerfile end to end.