Skip to content

Commit

Permalink
upddate workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
EzioPearce committed Mar 28, 2024
1 parent ac4eedd commit b9271d5
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 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
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 }}

0 comments on commit b9271d5

Please sign in to comment.