From ef8252671bc5da867c0f1219b46566bcbfa88123 Mon Sep 17 00:00:00 2001 From: Antonin Cezard Date: Sun, 8 Jun 2025 09:38:59 +0200 Subject: [PATCH] fix: streamline backend env vars the .env file was mangled and unreadable, simplifying without it --- .github/workflows/ci.yml | 9 ++++----- backend/.env.example | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0083033..2245721 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,9 @@ jobs: needs: [backend, frontend] if: github.ref == 'refs/heads/main' runs-on: self-hosted + env: + PORT: 8080 + PC_DETAILS: ${{ secrets.PC_DETAILS }} steps: - name: Fix workspace permissions run: | @@ -75,10 +78,6 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - # Create .env files from secrets - - name: Create backend .env file - run: echo "${{ secrets.BACKEND_ENV }}" > ./backend/.env - - name: Create frontend .env file run: echo "${{ secrets.FRONTEND_ENV }}" > ./frontend/.env @@ -86,4 +85,4 @@ jobs: run: | git pull origin main chmod +x start.sh - ./start.sh prod true \ No newline at end of file + ./start.sh prod true diff --git a/backend/.env.example b/backend/.env.example index a33f6b9..7026aa6 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,2 +1,2 @@ -PC_DETAILS="{\"john\": {\"mac\": \"00:00:00:00:00:00\", \"ip\": \"192.168.1.2\", \"rdp_user\": \"john\", \"rdp_password\": \"foobar\"}, \"doe\": {\"mac\": \"01:01:01:01:01:01\", \"ip\": \"192.168.1.3\", \"rdp_user\": \"doe\", \"rdp_password\": \"securepassword\"}}" +PC_DETAILS="{"john":{"mac":"00:00:00:00:00:0","ip":"192.168.1.1","interface":"eth0"},"doe":{"mac":"00:00:00:00:00:00","ip":"192.168.1.2","interface":"wlan0"}}" PORT=8080