-
Notifications
You must be signed in to change notification settings - Fork 117
58 lines (50 loc) · 1.72 KB
/
check-registry-apps.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
name: Check apps registry
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
file_changed: ${{ steps.check_modified.outputs.file_changed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check if file was modified
id: check_modified
run: |
set +eo pipefail
git diff --name-only origin/main HEAD | grep -q "front/lib/registry.ts"
if [ $? -eq 0 ]; then
echo "file_changed=true" >> $GITHUB_OUTPUT
else
echo "file_changed=false" >> $GITHUB_OUTPUT
fi
validate:
needs: check-changes
runs-on: ubuntu-latest
if: |
needs.check-changes.outputs.file_changed == 'true'
steps:
- uses: actions/checkout@v3
- name: Setup validation environment
uses: actions/setup-node@v3
with:
node-version: 20.13.0
cache: "npm"
cache-dependency-path: ./front/package-lock.json
- name: Build types
working-directory: types
run: npm install && npm run build
- name: Build sdks/js
working-directory: sdks/js
run: npm install && npm run build
- name: Run validation
id: validate
working-directory: front
run: |
set -eo pipefail
npm install
npx tsx ./admin/check_registry_apps.ts --execute --url https://dust.tt --wId 78bda07b39 --spaceId vlt_rICtlrSEpWqX --apiKey ${{ secrets.DUST_APPS_US_API_KEY }}
npx tsx ./admin/check_registry_apps.ts --execute --url https://eu.dust.tt --wId W1YzXC9nhN --spaceId vlt_p5kel5XkwVqEnpKcdXzC --apiKey ${{ secrets.DUST_APPS_EU_API_KEY }}