From 6f9ef7526cb4fe9a11bfb2eb32820997aaa5395d Mon Sep 17 00:00:00 2001 From: Aryan Prince Date: Mon, 22 Jul 2024 11:01:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20ci:=20Refactor=20`env`=20variabl?= =?UTF-8?q?e=20setup=20to=20composite=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 24 ------------------------ tooling/github-actions/setup/action.yml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d7b8d5..d789233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,18 +79,6 @@ jobs: - name: Setup uses: ./tooling/github-actions/setup - - name: Setup environment variables for Student - run: cp .env.example .env - working-directory: apps/student/ - - - name: Setup environment variables for Library - run: cp .env.example .env - working-directory: apps/library/ - - - name: Setup environment variables for Finance - run: cp .env.example .env - working-directory: apps/finance/ - - name: Run local databases with Docker Compose uses: hoverkraft-tech/compose-action@v2.0.1 @@ -111,18 +99,6 @@ jobs: - name: Setup uses: ./tooling/github-actions/setup - - name: Setup environment variables for Student - run: cp .env.example .env - working-directory: apps/student/ - - - name: Setup environment variables for Library - run: cp .env.example .env - working-directory: apps/library/ - - - name: Setup environment variables for Finance - run: cp .env.example .env - working-directory: apps/finance/ - - name: Run local databases with Docker Compose uses: hoverkraft-tech/compose-action@v2.0.1 diff --git a/tooling/github-actions/setup/action.yml b/tooling/github-actions/setup/action.yml index bc60f13..b16c0f8 100644 --- a/tooling/github-actions/setup/action.yml +++ b/tooling/github-actions/setup/action.yml @@ -20,3 +20,18 @@ runs: - name: Install dependencies with pnpm shell: bash run: pnpm install + + - name: Setup environment variables for Student + shell: bash + run: cp .env.example .env + working-directory: apps/student/ + + - name: Setup environment variables for Library + shell: bash + run: cp .env.example .env + working-directory: apps/library/ + + - name: Setup environment variables for Finance + shell: bash + run: cp .env.example .env + working-directory: apps/finance/