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 5656
5757 echo "image_tags=${image_tags}" >> "$GITHUB_OUTPUT"
5858
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+
5970 - name : 🐙 Login to GitHub Container Registry
6071 uses : docker/login-action@v3
6172 with :
7081 platforms : linux/amd64,linux/arm64
7182 tags : ${{ steps.set_tags.outputs.image_tags }}
7283 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
8282COPY --from=builder /usr/local/bin/goose /usr/local/bin/goose
8383COPY --from=builder --chown=node:node /triggerdotdev/internal-packages/clickhouse/schema /triggerdotdev/internal-packages/clickhouse/schema
8484
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+
8595EXPOSE 3000
8696
8797USER node
You can’t perform that action at this time.
0 commit comments