From 750ffdc605eb61503c0ff6e08d0338d373e0ddd7 Mon Sep 17 00:00:00 2001 From: Anusha Bhattacharya Date: Sun, 3 Nov 2024 09:20:00 +0530 Subject: [PATCH] try again --- .github/workflows/firebase-hosting-merge.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 0e7b755..9b3828c 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -35,11 +35,11 @@ jobs: create_credentials_file: true credentials_json: ${{ secrets.GCP_SA_KEY }} - - name: Build and Push with Cloud Build + - name: Build and Push to Google Container Registry run: | - gcloud builds submit --tag gcr.io/${{ secrets.GCP_PROJECT_ID }}/bookenzy-backend:latest \ - --build-arg DATABASE_URL=${{ secrets.DATABASE_URL_PROD }} \ - --build-arg BOOKENZY_JWT_SECRET=${{ secrets.JWT_SECRET_PROD }} . + gcloud auth configure-docker + docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/bookenzy-backend:latest . + docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/bookenzy-backend:latest - name: Deploy to Cloud Run uses: google-github-actions/deploy-cloudrun@v2 @@ -50,4 +50,6 @@ jobs: region: asia-south2 allow_unauthenticated: true credentials_json: ${{ secrets.GCP_SA_KEY }} - set-env-vars: DATABASE_URL=${{ secrets.DATABASE_URL_PROD }},BOOKENZY_JWT_SECRET=${{ secrets.JWT_SECRET_PROD }} # Add your environment variables here + set-env-vars: | + DATABASE_URL=${{ secrets.DATABASE_URL_PROD }}, + BOOKENZY_JWT_SECRET=${{ secrets.JWT_SECRET_PROD }}