From c322ef00e74fcfd3accfc17c7f56c24894e18a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Arroba?= <19954079+cesararroba@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:01:16 +0100 Subject: [PATCH] chore(ui): add prowler version on build (#7120) --- .github/workflows/ui-build-lint-push-containers.yml | 4 ++++ ui/Dockerfile | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/ui-build-lint-push-containers.yml b/.github/workflows/ui-build-lint-push-containers.yml index 9669271910..6f35770336 100644 --- a/.github/workflows/ui-build-lint-push-containers.yml +++ b/.github/workflows/ui-build-lint-push-containers.yml @@ -84,6 +84,8 @@ jobs: uses: docker/build-push-action@v6 with: context: ${{ env.WORKING_DIRECTORY }} + build-args: | + NEXT_PUBLIC_PROWLER_RELEASE_VERSION=${{ env.SHORT_SHA }} # Set push: false for testing push: true tags: | @@ -97,6 +99,8 @@ jobs: uses: docker/build-push-action@v6 with: context: ${{ env.WORKING_DIRECTORY }} + build-args: | + NEXT_PUBLIC_PROWLER_RELEASE_VERSION=${{ env.RELEASE_TAG }} push: true tags: | ${{ env.PROWLERCLOUD_DOCKERHUB_REPOSITORY }}/${{ env.PROWLERCLOUD_DOCKERHUB_IMAGE }}:${{ env.RELEASE_TAG }} diff --git a/ui/Dockerfile b/ui/Dockerfile index a8c698c014..926cbfdfbd 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -26,6 +26,8 @@ COPY . . # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. ENV NEXT_TELEMETRY_DISABLED=1 +ARG NEXT_PUBLIC_PROWLER_RELEASE_VERSION +ENV NEXT_PUBLIC_PROWLER_RELEASE_VERSION=${NEXT_PUBLIC_PROWLER_RELEASE_VERSION} RUN \ if [ -f package-lock.json ]; then npm run build; \