Skip to content

Commit 8aae63e

Browse files
authored
feat: pass GIT_SHA/GIT_BRANCH/VERSION build args to docker build (#390)
Forwards `GIT_SHA`, `GIT_BRANCH` and `VERSION` to the docker build in the deploy action. `GIT_SHA` is the full commit that's already computed for `COMMIT_HASH`, `GIT_BRANCH` is the source ref, and `VERSION` is 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.
1 parent f9d3c6d commit 8aae63e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/actions/deploy/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ runs:
210210
build-args: |
211211
${{ inputs.build_args }}
212212
COMMIT_HASH=${{ steps.git_commit_hash_full.outputs.git_commit_hash_full }}
213+
GIT_SHA=${{ steps.git_commit_hash_full.outputs.git_commit_hash_full }}
214+
GIT_BRANCH=${{ inputs.source_ref }}
215+
VERSION=${{ inputs.source_ref }}-${{ steps.git_commit_hash.outputs.git_commit_hash }}
213216
labels: |
214217
ethpandaops.io.repo=${{ inputs.source_repository }}
215218
ethpandaops.io.commitRef=${{ inputs.source_ref }}

0 commit comments

Comments
 (0)