-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 1.41 KB
/
ui_pull_request.yml
File metadata and controls
66 lines (58 loc) · 1.41 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: UI PR
on:
pull_request:
paths:
- src/common/node/**
- src/protos/**
- src/ui/**
env:
CI: true
jobs:
yarn_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/ui
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.14
cache: yarn
- name: Restore dependencies
run: yarn install --immutable --check-cache
- name: Run tests
run: yarn test
- name: Build app
run: yarn build
docker_build:
runs-on: ubuntu-latest
env:
BASE_IMAGE: localhost:5000/safir/ui-base
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: Build base image
id: base-build
uses: docker/build-push-action@v3
with:
file: ./src/common/node/Dockerfile
push: true
tags: ${{ env.BASE_IMAGE }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Docker build
uses: docker/build-push-action@v3
with:
file: ./src/ui/Dockerfile
build-args: BaseImage=${{ env.BASE_IMAGE }}
cache-from: type=gha
cache-to: type=gha,mode=max