From 1f2af04ea9573c856333495ba6d4f2f3df2a2bf6 Mon Sep 17 00:00:00 2001 From: Dario Date: Mon, 11 Mar 2024 19:03:06 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20.env=20in=20github=20action=20Co-autho?= =?UTF-8?q?red-by:=20Gonzalo=20Su=C3=A1rez=20Losada=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 5 +++++ webapp/Dockerfile | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b712f969..8a98e767 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,12 @@ jobs: packages: write needs: [ e2e-tests ] steps: + - uses: actions/checkout@v4 + + - name: Create .env file + run: echo "REACT_APP_API_ENDPOINT=${{ secrets.DEPLOY_HOST }}:8080" > webapp/.env + - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v5 env: diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 08d1de31..cc71f38a 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -6,8 +6,6 @@ WORKDIR /app #Install the dependencies RUN npm install -ARG REACT_APP_API_ENDPOINT -RUN echo "REACT_APP_API_ENDPOINT=$REACT_APP_API_ENDPOINT" > .env #Create an optimized version of the webapp RUN npm run build RUN npm install serve