-
Notifications
You must be signed in to change notification settings - Fork 235
33 lines (29 loc) · 885 Bytes
/
Copy pathvalidate.yml
File metadata and controls
33 lines (29 loc) · 885 Bytes
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
name: Plugin Validator
on: [pull_request]
jobs:
verify-json-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Validate JSON
uses: docker://orrosenblatt/validate-json-action:latest
env:
INPUT_SCHEMA: ./schema.json
INPUT_JSONS: ./plugins.json
validate:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Checkout the code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensures we have the full history for diff
- name: Validate
run: |
npm ci
git fetch origin ${{ github.base_ref }}
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
CHANGED_FILES="$CHANGED_FILES" npm run validate