-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (40 loc) · 1.06 KB
/
deploy-fetch-alerts.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
name: Deploy fetch alerts cloud functions to google
permissions:
id-token: write
contents: read
on:
push:
branches:
- 'develop'
- 'master'
paths:
- 'cloud-functions/fetch-alerts/**'
workflow_dispatch:
jobs:
run:
name: Deploy fetch alerts cloud function
runs-on: ubuntu-20.04
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v3
- id: auth
name: Authenticate in google cloud services
uses: google-github-actions/[email protected]
with:
credentials_json: '${{ secrets.gcp_credentials }}'
- id: 'deploy'
name: GC Functions deployment
uses: 'google-github-actions/[email protected]'
with:
name: 'fetch-alerts'
runtime: 'nodejs10'
entry_point: 'fetchAlerts'
memory_mb: '128'
region: 'us-central1'
source_dir: 'cloud-functions/fetch-alerts'
# Example of using the output
- id: 'test'
name: GC Functions testing deployment
run: 'curl "${{ steps.deploy.outputs.url }}"'