Skip to content

Commit

Permalink
change entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
EzioPearce committed Mar 28, 2024
1 parent 0ce6770 commit 5b759ae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/buildTrigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5b759ae

Please sign in to comment.