-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.22 KB
/
deploy-release.yaml
File metadata and controls
42 lines (39 loc) · 1.22 KB
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
42
name: Deploy release
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v3
- id: 'auth'
# https://github.com/google-github-actions/auth
uses: 'google-github-actions/auth@v0'
with:
# https://cloud.google.com/blog/products/identity-security/enabling-keyless-authentication-from-github-actions
workload_identity_provider: 'projects/1234/locations/global/workloadIdentityPools/pool-name/providers/provider-name'
service_account: 'service-account@project-id.iam.gserviceaccount.com'
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy to Google Cloud Functions
id: deploy
uses: 'google-github-actions/deploy-cloud-functions@v1'
with:
name: 'my-function'
entry_point: 'exampleHttpFunction'
memory_mb: 128
source_dir: 'dist'
runtime: 'nodejs20'
region: 'europe-west2'