From 5b759ae5acbf3a64a843d5b959a01d31d396c344 Mon Sep 17 00:00:00 2001 From: krishna Date: Thu, 28 Mar 2024 18:48:15 +0530 Subject: [PATCH] change entrypoint --- .github/workflows/buildTrigger.yaml | 38 ++++++++++++++--------------- index.js | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/buildTrigger.yaml b/.github/workflows/buildTrigger.yaml index 7a76287..d6229ed 100644 --- a/.github/workflows/buildTrigger.yaml +++ b/.github/workflows/buildTrigger.yaml @@ -38,22 +38,22 @@ jobs: gcloud config set project ${{ env.PROJECT_ID }} - name: Deploy Cloud Function - uses: 'google-github-actions/deploy-cloud-functions@v2' - with: - name: helloHttp - runtime: 'nodejs20' - # run: | - # gcloud functions deploy ${{ env.FUNCTION_NAME }} \ - # --trigger-http \ - # --gen2 \ - # --region ${{ env.REGION }} \ - # --runtime nodejs20 \ - # --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 }} + # uses: 'google-github-actions/deploy-cloud-functions@v2' + # with: + # name: helloHttp + # runtime: 'nodejs20' + run: | + gcloud functions deploy ${{ env.FUNCTION_NAME }} \ + --trigger-http \ + --gen2 \ + --region ${{ env.REGION }} \ + --runtime nodejs20 \ + --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 }} diff --git a/index.js b/index.js index 6b655e3..7f3ffb7 100644 --- a/index.js +++ b/index.js @@ -113,7 +113,7 @@ const uploadToGCS = async (file_location, bucket_name, upload_prefix, final_outp -functions.http('helloHttp', async (req, res) => { +functions.http('generate-minfile-cf', async (req, res) => { // Launch the browser and open a new blank page let imgUrl = req.query.img; let objectId = req.query.id;