From 571377a017961c9aed53b112c92cc57e41620be2 Mon Sep 17 00:00:00 2001 From: karntrehan Date: Wed, 5 Jun 2024 15:04:41 +0530 Subject: [PATCH] Add env variables. --- .github/workflows/deploy.yml | 6 +++++- sample.env | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 sample.env diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f34f2790e..815f47944 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -60,6 +60,8 @@ jobs: env: TAG_LATEST: ${{ needs.set_vars.outputs.TAG_LATEST }} TAG_ENV_COMMIT: ${{ needs.set_vars.outputs.TAG_ENV_COMMIT }} + API_BASE_URL: ${{ vars[format('APP_{0}_API_BASE_URL', needs.set_vars.outputs.APP_ENV)] }} + API_AUTH_KEY: ${{ secrets[format('APP_{0}_API_AUTH_KEY', needs.set_vars.outputs.APP_ENV)] }} steps: - name: Checkout code uses: actions/checkout@v2 @@ -79,7 +81,9 @@ jobs: - name: Read Secrets run: | - touch .env + echo "API_BASE_URL=${API_BASE_URL}" >> .env + echo "SUPABASE_KEY=${SUPABASE_KEY}" >> .env + echo "API_AUTH_KEY=${API_AUTH_KEY}" >> .env mv .env ${{ env.DOT_ENV_FILE_NAME }} - name: Copy env file to DEV Server diff --git a/sample.env b/sample.env new file mode 100644 index 000000000..db1bbf51d --- /dev/null +++ b/sample.env @@ -0,0 +1,2 @@ +API_BASE_URL="" +API_AUTH_KEY=""