Skip to content

Commit b8618fe

Browse files
authored
Bake GIT_COMMIT_SHA into runner image (#2939)
runContainer reports it as the runner's version, letting the Talos admin announce redeploys to Discord. Empty default keeps local builds working.
1 parent 804b89e commit b8618fe

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/aws-deployment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ jobs:
7676
file: ./contracts/dockerfile-actions
7777
push: true
7878
ssh: default
79+
build-args: |
80+
GIT_COMMIT_SHA=${{ github.sha }}
7981
tags: |
8082
${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
8183

contracts/dockerfile-actions

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,12 @@ ENV MAINNET_PROVIDER_URL="" \
6969
BEACON_PROVIDER_URL="" \
7070
HARDHAT_NETWORK=""
7171

72+
# Git commit this image was built from. CI passes
73+
# --build-arg GIT_COMMIT_SHA=<github.sha>; empty for local builds. @talos/client's
74+
# runContainer reports it as the runner's `version`, letting the admin announce
75+
# redeploys to Discord.
76+
ARG GIT_COMMIT_SHA=""
77+
ENV GIT_COMMIT_SHA=$GIT_COMMIT_SHA
78+
7279
USER runner
7380
CMD ["bun", "run", "runner.ts"]

0 commit comments

Comments
 (0)