-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (45 loc) · 1.5 KB
/
verify.yaml
File metadata and controls
55 lines (45 loc) · 1.5 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
name: Verify
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
verify:
# if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
env:
DIST_DIR: ./build
PUBLISH_BRANCH: gh-pages
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install yq
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install yq -y
- name: Install jq
run: |
curl -Lo jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
chmod +x jq
sudo mv jq /usr/local/bin
- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '16'
registry-url: https://registry.npmjs.org/
- name: Build Catalog UI
run: |
npm ci
CI=false npm run build
- name: Build Catalog YAML
run: |
./.github/scripts/build-catalog.sh ${{ env.DIST_DIR }}
- name: Verify catalog schema
run: |
npm i -g ajv-cli
ajv test -s ./schemas/catalog.json -d ${{ env.DIST_DIR }}/index.yaml --valid