File tree Expand file tree Collapse file tree 6 files changed +422
-867
lines changed Expand file tree Collapse file tree 6 files changed +422
-867
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Code Generation Function
2+
3+ on : workflow_dispatch
4+
5+ jobs :
6+ deploy :
7+ runs-on : ubuntu-latest
8+
9+ permissions :
10+ contents : read
11+ id-token : write
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Google Cloud Auth
17+ id : auth
18+ uses : google-github-actions/auth@v2
19+ with :
20+ credentials_json : ${{ secrets.GCP_SA_CREDENTIALS }}
21+
22+ - name : Set up gcloud
23+ uses : google-github-actions/setup-gcloud@v2
24+
25+ - name : Deploy to Cloud Functions
26+ working-directory : functions/code_generation
27+ run : |
28+ gcloud functions deploy code-generation \
29+ --gen2 \
30+ --trigger-http \
31+ --allow-unauthenticated \
32+ --region=us-central1 \
33+ --timeout=300 \
34+ --memory=2Gi \
35+ --runtime=python311 \
36+ --entry-point=handle_phabricator_webhook \
37+ --service-account=review-helper@moz-bugbug.iam.gserviceaccount.com \
38+ --set-secrets=OPENAI_API_KEY=openai-api-key:latest
You can’t perform that action at this time.
0 commit comments