-
Notifications
You must be signed in to change notification settings - Fork 112
45 lines (39 loc) · 1012 Bytes
/
validate.yaml
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
name: validate-files
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# Allows you to run this workflow manually
workflow_dispatch:
jobs:
validate-files:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
- name: yarn-install
run: |
yarn install
CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES"
git diff
exit 1
fi
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 20
- name: validate-file-path
run: |
node ./scripts/validate-file-path.js
- name: validate-svg
run: |
node ./scripts/validate-svg.js