File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 56
56
57
57
echo "image_tags=${image_tags}" >> "$GITHUB_OUTPUT"
58
58
59
+ - name : 📝 Set the build info
60
+ id : set_build_info
61
+ run : |
62
+ tag=${{ steps.get_tag.outputs.tag }}
63
+ if [[ "${{ steps.get_tag.outputs.is_semver }}" == true ]]; then
64
+ echo "BUILD_APP_VERSION=${tag}" >> "$GITHUB_OUTPUTS"
65
+ fi
66
+ echo "BUILD_GIT_SHA=${{ github.sha }}" >> "$GITHUB_OUTPUTS"
67
+ echo "BUILD_GIT_REF_NAME=${{ github.ref_name }}" >> "$GITHUB_OUTPUTS"
68
+ echo "BUILD_TIMESTAMP_SECONDS=$(date +%s)" >> "$GITHUB_OUTPUTS"
69
+
59
70
- name : 🐙 Login to GitHub Container Registry
60
71
uses : docker/login-action@v3
61
72
with :
70
81
platforms : linux/amd64,linux/arm64
71
82
tags : ${{ steps.set_tags.outputs.image_tags }}
72
83
push : true
84
+ build-args : |
85
+ BUILD_APP_VERSION=${{ steps.set_build_info.outputs.BUILD_APP_VERSION }}
86
+ BUILD_GIT_SHA=${{ steps.set_build_info.outputs.BUILD_GIT_SHA }}
87
+ BUILD_GIT_REF_NAME=${{ steps.set_build_info.outputs.BUILD_GIT_REF_NAME }}
88
+ BUILD_TIMESTAMP_SECONDS=${{ steps.set_build_info.outputs.BUILD_TIMESTAMP_SECONDS }}
Original file line number Diff line number Diff line change @@ -82,6 +82,16 @@ COPY --from=builder --chown=node:node /triggerdotdev/scripts ./scripts
82
82
COPY --from=builder /usr/local/bin/goose /usr/local/bin/goose
83
83
COPY --from=builder --chown=node:node /triggerdotdev/internal-packages/clickhouse/schema /triggerdotdev/internal-packages/clickhouse/schema
84
84
85
+ # Build info
86
+ ARG BUILD_APP_VERSION
87
+ ARG BUILD_GIT_SHA
88
+ ARG BUILD_GIT_REF_NAME
89
+ ARG BUILD_TIMESTAMP_SECONDS
90
+ ENV BUILD_APP_VERSION=${BUILD_APP_VERSION} \
91
+ BUILD_GIT_SHA=${BUILD_GIT_SHA} \
92
+ BUILD_GIT_REF_NAME=${BUILD_GIT_REF_NAME} \
93
+ BUILD_TIMESTAMP_SECONDS=${BUILD_TIMESTAMP_SECONDS}
94
+
85
95
EXPOSE 3000
86
96
87
97
USER node
You can’t perform that action at this time.
0 commit comments