-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.06 KB
/
build-latest.yaml
File metadata and controls
46 lines (40 loc) · 1.06 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
43
44
45
46
name: Build latest
on:
push:
branches: [main]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: find . -name 'package-lock.json' -execdir npm ci \;
- name: Run server
run: npm start &
- name: Wait for server to start
run: npx wait-on tcp:8585
- name: Run tests
run: npm run test
build-latest:
name: Build latest
runs-on: ubuntu-latest
env:
PROJECT_ID: ${{ secrets.GCP_BUILD_PROJECT_ID }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_BUILD_SERVICE_ACCOUNT_KEY }}
- uses: google-github-actions/setup-gcloud@v2
- name: Build
run: |-
gcloud builds submit \
--quiet \
--tag "eu.gcr.io/$PROJECT_ID/functions:latest"