-
Notifications
You must be signed in to change notification settings - Fork 388
89 lines (75 loc) · 2.23 KB
/
argilla-frontend.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
name: Build Argilla frontend package
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_call:
pull_request:
paths:
- "argilla-frontend/**"
permissions:
contents: read
id-token: write
pull-requests: write
jobs:
build:
name: Build argilla-frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: argilla-frontend
steps:
- name: Checkout Code 🛎
uses: actions/checkout@v4
- name: Setup Node.js ⚙️
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies 📦
run: |
npm install
- name: Run lint 🧹
run: |
npm run lint
- name: Run tests 🧪
run: |
npm run test
- name: Build package 📦
env:
# BASE_URL is used in the server to support parameterizable base root path
# See scripts/build_frontend.sh
BASE_URL: "@@baseUrl@@"
DIST_FOLDER: ./dist
run: |
npm run build
- name: Upload frontend statics as artifact
uses: actions/upload-artifact@v4
with:
name: argilla-frontend
path: argilla-frontend/dist
build_dev_docker_image:
name: Build development argilla-fronted docker image
needs: build
uses: ./.github/workflows/argilla-frontend.build-push-dev-frontend-docker.yml
if: |
!cancelled() &&
github.event_name == 'pull_request' && github.event.pull_request.draft == false
with:
image-name: argilla/argilla-frontend-for-dev
dockerfile: argilla-frontend/dev.frontend.Dockerfile
platforms: linux/amd64
build-args: |
ARGILLA_SERVER_TAG=main
secrets: inherit
deploy:
name: Deploy pr environment
uses: ./.github/workflows/argilla-frontend.deploy-environment.yml
needs: build_dev_docker_image
if: |
!cancelled() &&
needs.build_dev_docker_image.result == 'success' &&
github.event_name == 'pull_request' && github.event.pull_request.draft == false
with:
image-name: argilla/argilla-frontend-for-dev
image-version: ${{ needs.build_dev_docker_image.outputs.version }}
secrets: inherit