From b16d11348d130b3c625ac2077bd7d61db812ae17 Mon Sep 17 00:00:00 2001 From: yash patel Date: Fri, 24 May 2024 12:22:32 -0400 Subject: [PATCH] chnages in cloud run deploy --- .github/workflows/google-cloudrun-docker.yml | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 9c7edcb..8200671 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -96,14 +96,22 @@ jobs: # END - Docker auth and build + # - name: Deploy to Cloud Run + # id: deploy + # uses: google-github-actions/deploy-cloudrun@v1 + # with: + # service: ${{ env.SERVICE }} + # region: ${{ env.REGION }} + # # NOTE: If using a pre-built image, update the image name here + # image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/nodecicd:${{ github.sha }} + - name: Deploy to Cloud Run - id: deploy - uses: google-github-actions/deploy-cloudrun@v1 - with: - service: ${{ env.SERVICE }} - region: ${{ env.REGION }} - # NOTE: If using a pre-built image, update the image name here - image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/nodecicd:${{ github.sha }} + run: | + gcloud run deploy my-app \ + --image ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/nodecicd:${{ github.sha }} \ + --platform managed \ + --region us-east1 \ + --allow-unauthenticated env: GCP_PROJECT_ID: ${{ env.PROJECT_ID }}