-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.41 KB
/
deploy_queue_files.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: deploy_queue_files
on:
push:
branches:
- main
paths:
- queue_files/main.py
- queue_files/requirements.txt
- .github/workflows/deploy_queue_files.yml
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.ref == 'refs/heads/main'
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v4
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.gcp_credentials }}"
- id: "deploy"
uses: "google-github-actions/deploy-cloud-functions@v1"
with:
name: "projects/greg-finley/locations/us-west1/functions/dropbox-queue-files"
runtime: "python310"
entry_point: "run"
source_dir: "queue_files"
memory_mb: 256
secret_environment_variables: "NEON_DATABASE_URL=projects/greg-finley/secrets/NEON_DATABASE_URL/versions/latest,DROPBOX_ACCESS_TOKEN=projects/greg-finley/secrets/DROPBOX_ACCESS_TOKEN/versions/latest,DROPBOX_CONFIG=projects/greg-finley/secrets/DROPBOX_CONFIG/versions/latest"
timeout: 540
event_trigger_type: "providers/cloud.pubsub/eventTypes/topic.publish"
event_trigger_resource: "projects/greg-finley/topics/dropbox-queue-files"
event_trigger_service: "pubsub.googleapis.com"
min_instances: 0
max_instances: 3000