From e672fd313ac47df9e2ba4f20f576768623eb7d32 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Thu, 9 Jan 2025 16:53:54 +0000 Subject: [PATCH] set CONDUWUIT_VERSION_EXTRA for docker containers --- .github/workflows/publish-image.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 0a80f1bb..2f51a6a7 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -161,13 +161,20 @@ jobs: # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. # It will not push images generated from a pull request + - name: Set short git commit SHA + id: sha + run: | + calculatedSha=$(git rev-parse --short ${{ github.sha }}) + echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV - name: Build and push Docker image by digest id: build uses: docker/build-push-action@v6 with: context: . file: "Containerfile" - build-args: ${{ matrix.target_cpu != 'base' && format('TARGET_CPU={0}', matrix.target_cpu) || '' }} + build-args: | + ${{ matrix.target_cpu != 'base' && format('TARGET_CPU={0}', matrix.target_cpu) || '' }} + CONDUWUIT_VERSION_EXTRA=${{ env.COMMIT_SHORT_SHA }} platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }}