-
-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (89 loc) · 2.51 KB
/
admin-web-pull-request.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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Admin Web - Pull Request
on:
pull_request:
branches:
- daily
- release/alpha
- master
paths:
- ".github/workflows/**"
- "packages/@liexp/**/src/**"
- "services/admin-web/**"
env:
ADMIN_WEB_IMAGE_NAME: liexp-admin-web
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
hash: ${{ hashFiles('**/pnpm-lock.yaml') }}
build-packages:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
hash: ${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/build-packages
with:
hash: ${{ github.sha }}
lint:
runs-on: ubuntu-latest
needs: [install, build-packages]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
hash: ${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/build-packages
with:
hash: ${{ github.sha }}
- name: Lint code
run: pnpm admin-web lint
build:
runs-on: ubuntu-latest
needs: [install, build-packages]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
hash: ${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/build-packages
with:
hash: ${{ github.sha }}
- uses: actions/cache@v4
with:
path: |
services/**/build
key: admin-web-build
- name: Type Check Web
run: pnpm admin-web build
- name: Build app
run: pnpm admin-web build:app
docker_build:
if: ${{ github.head_ref == 'release/alpha' }}
runs-on: ubuntu-latest
needs: [install, build-packages, lint, build]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
hash: ${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Log in to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build WEB image
uses: docker/build-push-action@v4
with:
context: .
file: ./adminWeb.Dockerfile
push: false
tags: ${{ env.ADMIN_WEB_IMAGE_NAME }}