From 275e4a12327803c8f8537a3326c78fcd0b8a1b51 Mon Sep 17 00:00:00 2001 From: TomDijkema Date: Wed, 11 Dec 2024 15:38:49 +0100 Subject: [PATCH] Second try --- .github/workflows/build.yaml | 4 ++-- dockerfile | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8eb94d4b..0b1f64df 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -55,8 +55,8 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - env: - VITE_KEYCLOAK_CLIENT: ${{ matrix.keycloak_client }} + build-args: | + "VITE_KEYCLOAK_CLIENT=${{ matrix.keycloak_token }}" - name: Set outputs id: vars diff --git a/dockerfile b/dockerfile index 4a7775f5..3f6442db 100644 --- a/dockerfile +++ b/dockerfile @@ -21,6 +21,10 @@ RUN cp 'src/app/GenerateTypes.js' 'src/app/GenerateTypes.cjs' RUN rm 'src/app/GenerateTypes.js' RUN node 'src/app/GenerateTypes.cjs' +# Set env variables +ARG VITE_KEYCLOAK_CLIENT +ENV VITE_KEYCLOAK_CLIENT ${VITE_KEYCLOAK_CLIENT} + # Setting app to production build RUN npm run build