-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.34 KB
/
build.yaml
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
43
44
45
46
47
48
49
50
51
52
# These workflows are copied from stardust-npm-scripts. Edit them there.
---
name: Lint, test and build
on: push
env:
GCLOUD_PROJECT_NAME: um-cloud-production
GCLOUD_PROJECT_ID: 72990522503
permissions:
# Needed to clone the repo
contents: read
# Needed for Workload Identity
id-token: write
# Needed to pull docker images
packages: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: google-github-actions/auth@v0
with:
workload_identity_provider: projects/${{ env.GCLOUD_PROJECT_ID }}/locations/global/workloadIdentityPools/github/providers/github-actions
service_account: github-actions@${{ env.GCLOUD_PROJECT_NAME }}.iam.gserviceaccount.com
- name: Get common secrets
id: secrets
uses: google-github-actions/get-secretmanager-secrets@v0
with:
secrets: |-
github:${{ env.GCLOUD_PROJECT_NAME }}/github
- name: NPM cache
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
env:
GITHUB_TOKEN: ${{ fromJson(steps.secrets.outputs.github).token }} # Needed because we install private packages from npm.pkg.github.com
- run: npm run build
- run: npm run lint