-
Notifications
You must be signed in to change notification settings - Fork 248
101 lines (83 loc) · 2.66 KB
/
tusk-sanity-check.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
name: Tusk Sanity Check
on:
workflow_dispatch:
inputs:
taskId:
description: "Tusk Task ID"
required: true
runType:
description: "Tusk Run Type"
required: true
runId:
description: "Tusk Run ID"
required: true
jobs:
sanity_check:
runs-on: ubuntu-latest
steps:
- name: Log inputs/branch
run: |
echo "Tusk Task ID: ${{ github.event.inputs.taskId }}"
echo "Tusk Run Type: ${{ github.event.inputs.runType }}"
echo "Tusk Run ID: ${{ github.event.inputs.runId }}"
echo "Branch: ${{ github.ref }}"
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.event.repository.default_branch }}
# Space delimited list usable as command-line argument list in Linux shell. If needed, it uses single or double quotes to wrap filename with unsafe characters.
list-files: 'shell'
filters: |
web:
- 'web/**/*'
bifrost:
- 'bifrost/**/*'
worker:
- 'worker/**/*'
- name: Set Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install bifrsot dependencies
if: steps.filter.outputs.bifrost == 'true'
run: yarn install
working-directory: ./bifrost
- name: Bifrost lint fix
if: steps.filter.outputs.bifrost == 'true'
run: yarn lint-fix
working-directory: ./bifrost
- name: Install web dependencies
if: steps.filter.outputs.web == 'true'
run: yarn install
working-directory: ./web
- name: Web lint fix
if: steps.filter.outputs.web == 'true'
run: yarn lint-fix
working-directory: ./web
- name: Install worker dependencies
if: steps.filter.outputs.worker == 'true'
run: yarn install
working-directory: ./worker
- name: Worker lint fix
if: steps.filter.outputs.worker == 'true'
run: yarn lint-fix
working-directory: ./worker
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "fix(${{ github.run_id }}): auto linting"
skip_fetch: true
skip_checkout: true
- name: Web build
if: steps.filter.outputs.web == 'true'
run: |
cp ../.env.example .env
yarn build
working-directory: ./web
- name: Bifrost build
if: steps.filter.outputs.bifrost == 'true'
run: |
yarn build
working-directory: ./bifrost