From e5004a4c3c5829fe45832101f37ac955ccf1c4d6 Mon Sep 17 00:00:00 2001 From: Mirza Mohammad Azwad <50703605+mirzaazwad@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:15:53 +0600 Subject: [PATCH] Changes to CD --- .github/workflows/main.cd.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.cd.yml b/.github/workflows/main.cd.yml index 435dc2d..cc4daeb 100644 --- a/.github/workflows/main.cd.yml +++ b/.github/workflows/main.cd.yml @@ -24,6 +24,19 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Set up mongo url secret + + run: echo "_MONGO_URI=${{ secrets._MONGO_URI }}" >> $GITHUB_ENV + + - name: Set up node environment variables + run: echo "_NODE_ENV=${{ vars._NODE_ENV }}" >> $GITHUB_ENV + + - name: Set up secrets + run: echo "_JWT_SECRET=${{ secrets._JWT_SECRET }}" >> $GITHUB_ENV + + - name: Set up port + run: echo "_NODE_ENV=${{ vars._PORT }}" >> $GITHUB_ENV + - name: Google Auth id: auth uses: 'google-github-actions/auth@v1' @@ -59,8 +72,8 @@ jobs: image: "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.SERVICE }}:${{ github.sha }}" flags: '--allow-unauthenticated' env: | - _PORT=${{vars._PORT}} - _NODE_ENV=${{ vars._NODE_ENV }} + _PORT=${{env._PORT}} + _NODE_ENV=${{ env._NODE_ENV }} _JWT_SECRET=${{ secrets._JWT_SECRET }} _MONGO_URI=${{ secrets._MONGO_URI }} _AUTH_TOKEN=${{secrets._AUTH_TOKEN}}