From b9271d55ed34db9bca2fa7831e9152ecf0ade501 Mon Sep 17 00:00:00 2001 From: krishna Date: Thu, 28 Mar 2024 17:51:55 +0530 Subject: [PATCH] upddate workflow file --- .github/workflows/buildTrigger.yaml | 32 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/buildTrigger.yaml b/.github/workflows/buildTrigger.yaml index dc56d2e..48e832c 100644 --- a/.github/workflows/buildTrigger.yaml +++ b/.github/workflows/buildTrigger.yaml @@ -19,11 +19,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - id: 'auth' name: 'Authenticate to Google Cloud' - uses: 'google-github-actions/auth@v1' + uses: 'google-github-actions/auth@v2' with: credentials_json: ${{ env.SERVICE_ACCOUNT_KEY }} @@ -38,18 +38,22 @@ jobs: gcloud config set project ${{ env.PROJECT_ID }} - name: Deploy Cloud Function - run: | - gcloud functions deploy ${{ env.FUNCTION_NAME }} \ - --gen2 \ - --region ${{ env.REGION }} \ - --runtime python39 \ - --min-instances 0 \ - --max-instances 10 \ - --memory 16GiB \ - --entry-point=function_handler \ - --timeout=540 \ - --update-env-vars GCP_PROJECT=${{ env.PROJECT_ID }} + uses: 'google-github-actions/deploy-cloud-functions@v2' + with: + name: 'helloHttp' + runtime: 'nodejs20' + # run: | + # gcloud functions deploy ${{ env.FUNCTION_NAME }} \ + # --gen2 \ + # --region ${{ env.REGION }} \ + # --runtime python39 \ + # --min-instances 0 \ + # --max-instances 10 \ + # --memory 16GiB \ + # --entry-point=function_handler \ + # --timeout=540 \ + # --update-env-vars GCP_PROJECT=${{ env.PROJECT_ID }} - name: Set Cloud Run CPU limits run: | - gcloud run services update ${{ env.FUNCTION_NAME }} --cpu 6 --concurrency 1000 --region ${{ env.REGION }} + gcloud run services update ${{ env.FUNCTION_NAME }} --cpu 6 --concurrency 1000 --region ${{ env.REGION }} \ No newline at end of file