From e1ed4bc7509e5fac65cffbdee6333ca4ee7ddea4 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Fri, 10 Feb 2023 15:48:54 +0100 Subject: [PATCH] Change Dockerfile to also pass the VERGEN_GIT_SEMVER_LIGHTWEIGHT when building --- .github/uffizzi/Dockerfile | 3 ++- .github/workflows/publish-docker-images.yml | 1 + Dockerfile | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/uffizzi/Dockerfile b/.github/uffizzi/Dockerfile index ae2b8231e..57ee4aa8d 100644 --- a/.github/uffizzi/Dockerfile +++ b/.github/uffizzi/Dockerfile @@ -7,7 +7,8 @@ WORKDIR /meilisearch ARG COMMIT_SHA ARG COMMIT_DATE -ENV COMMIT_SHA=${COMMIT_SHA} COMMIT_DATE=${COMMIT_DATE} +ARG GIT_TAG +ENV COMMIT_SHA=${COMMIT_SHA} COMMIT_DATE=${COMMIT_DATE} VERGEN_GIT_SEMVER_LIGHTWEIGHT=${GIT_TAG} ENV RUSTFLAGS="-C target-feature=-crt-static" COPY . . diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 5d1b50f79..34f52e0ed 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -92,6 +92,7 @@ jobs: build-args: | COMMIT_SHA=${{ github.sha }} COMMIT_DATE=${{ steps.build-metadata.outputs.date }} + GIT_TAG=$(printf "%q" ${{ github.ref_name }}) # /!\ Don't touch this without checking with Cloud team - name: Send CI information to Cloud team diff --git a/Dockerfile b/Dockerfile index 6846fdad7..70950f338 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ WORKDIR /meilisearch ARG COMMIT_SHA ARG COMMIT_DATE -ENV VERGEN_GIT_SHA=${COMMIT_SHA} VERGEN_GIT_COMMIT_TIMESTAMP=${COMMIT_DATE} +ARG GIT_TAG +ENV VERGEN_GIT_SHA=${COMMIT_SHA} VERGEN_GIT_COMMIT_TIMESTAMP=${COMMIT_DATE} VERGEN_GIT_SEMVER_LIGHTWEIGHT=${GIT_TAG} ENV RUSTFLAGS="-C target-feature=-crt-static" COPY . .