generated from joshcarp/whattimeisitrightnow
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 935 Bytes
/
deploy-subscribe.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
name: deploy
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup - gcloud / gsutil
uses: google-github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.GCLOUD_SERVICE_KEY }}
export_default_credentials: true
project_id: slack-rosterbot
- name: Deploy
run: |
gcloud functions deploy subscribe \
--entry-point=SubscribeHandler \
--runtime=go113 \
--trigger-http \
--set-env-vars=GCP_TOPIC=slack,PROJECT_ID=slack-rosterbot \
--allow-unauthenticated
- name: Set permissions
run: |-
gcloud functions add-iam-policy-binding subscribe\
--member="allUsers" \
--role="roles/cloudfunctions.invoker"