feat: pass GIT_SHA/GIT_BRANCH/VERSION build args to docker build#390
Merged
barnabasbusa merged 2 commits intoJun 5, 2026
Merged
Conversation
Clients whose Dockerfile no longer copies .git (e.g. ethrex after its BuildKit modernization) rely on these build args to stamp version metadata. Without them the binary reports an 'unknown' branch/sha and the OCI revision/version labels are empty. Reuses the already-computed full commit hash and the requested source ref.
Keeps VERSION distinct from GIT_BRANCH and pins the build in the OCI version label.
barnabasbusa
approved these changes
Jun 5, 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.
Forwards
GIT_SHA,GIT_BRANCHandVERSIONto the docker build in the deploy action.GIT_SHAis the full commit that's already computed forCOMMIT_HASH,GIT_BRANCHis the source ref, andVERSIONis the source ref plus the short commit (e.g.main-626c2f2).We changed the ethrex Dockerfile and it now reads these build args to stamp the version into the image. Without them the ethpandaops/ethrex images report an unknown version/commit and the OCI revision/version labels come out empty.
The values are already on hand here, so this just passes them through. Clients that don't declare the matching ARGs ignore them (BuildKit drops unused build args), same as COMMIT_HASH today.