Skip to content

Code generation tool cloud function #4962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/comment_resolver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy Code Generation Function

on: workflow_dispatch

jobs:
deploy:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Google Cloud Auth
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_CREDENTIALS }}

- name: Set up gcloud
uses: google-github-actions/setup-gcloud@v2

- name: Deploy to Cloud Functions
working-directory: functions/code_generation
run: |
gcloud functions deploy code-generation \
--gen2 \
--trigger-http \
--allow-unauthenticated \
--region=us-central1 \
--timeout=300 \
--memory=2Gi \
--runtime=python311 \
--entry-point=handle_phabricator_webhook \
--service-account=review-helper@moz-bugbug.iam.gserviceaccount.com \
--set-secrets=OPENAI_API_KEY=openai-api-key:latest
Loading