From c8bcd88929c340e2ee9e7ead7f31ad127384bc9f Mon Sep 17 00:00:00 2001 From: Mohamed ER-Radi Date: Mon, 5 Feb 2024 17:55:29 +0100 Subject: [PATCH] fix creating .env file for terraform workflow --- .github/workflows/terraform-staging.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/terraform-staging.yml b/.github/workflows/terraform-staging.yml index c765705b3..8e690cf72 100644 --- a/.github/workflows/terraform-staging.yml +++ b/.github/workflows/terraform-staging.yml @@ -51,6 +51,18 @@ jobs: run: echo "::set-output name=server_public_ip::$(cd terraform; terraform output server_public_ip)" if: success() + - name: Create .env file + env: + HOST_URL: ${{ steps.server_public_ip.outputs.server_public_ip }} + PLM_CLIENT_ID: ${{ secrets.STAGING_CLIENT_ID }} + run: | + cat << EOF > .env + NEXT_PUBLIC_BASE_APP=/api + NEXT_PUBLIC_HOST_URL=$HOST_URL + NEXT_PUBLIC_PLM_HOST=https://prof.parlemonde.org + NEXT_PUBLIC_CLIENT_ID=$PLM_CLIENT_ID + EOF + - name: Build Docker Image run: | docker build -t 1village .