Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:homingos/generate-minfile-cf into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mdozairq committed Mar 30, 2024
2 parents 8b05ea9 + 5b759ae commit efc26b3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/buildTrigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -38,18 +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 python39 \
--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: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.
.
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 efc26b3

Please sign in to comment.