diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index abe1cb3d0..0234e33a8 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -27,6 +27,9 @@ jobs: REPO_NAME: ${{ github.repository }} # Have to be build variable NEXT_PUBLIC_BASE_URL: ${{ inputs.base-url }} + # required because error pages use build time env vars, not runtime env vars + # it's the same on every environment + EMAIL_VARAAMO_EXT_LINK: "https://lomake.hel.fi/varaamo-palaute" permissions: contents: read @@ -78,6 +81,7 @@ jobs: build-args: | APP=${{ env.BUILD_APP }} NEXT_PUBLIC_BASE_URL=${{ env.NEXT_PUBLIC_BASE_URL }} + EMAIL_VARAAMO_EXT_LINK=${{ env.EMAIL_VARAAMO_EXT_LINK }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26cce084c..e25e8b377 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -env: - # required because error pages use build time env vars, not runtime env vars - # it's the same on every environment - EMAIL_VARAAMO_EXT_LINK: "https://lomake.hel.fi/varaamo-palaute" - jobs: # Build both ui and admin-ui dockers build-ui-docker: diff --git a/Dockerfile b/Dockerfile index 1d02b5dbf..cab3fffef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,8 @@ ARG NEXT_PUBLIC_TILAVARAUS_API_URL ENV NEXT_PUBLIC_TILAVARAUS_API_URL=$NEXT_PUBLIC_TILAVARAUS_API_URL ARG NEXT_PUBLIC_BASE_URL ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL +ARG EMAIL_VARAAMO_EXT_LINK +ENV EMAIL_VARAAMO_EXT_LINK=$EMAIL_VARAAMO_EXT_LINK # Build should not fail on missing env variables # TODO this should be removed because we need NEXT_PUBLIC_TILAVARAUS_API_URL to be set during build # unless we let it be undefined and use "" as default value (does it work?)