-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.38 KB
/
Copy pathprofiles.yml
File metadata and controls
55 lines (47 loc) · 1.38 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: Profiles CI
on:
push:
branches: ["**"]
paths:
- "profiles/**"
- "data/profiles.schema.json"
- "scripts/validate-profiles.js"
- "scripts/generate-profiles-index.js"
- "package.json"
pull_request:
branches: [main]
paths:
- "profiles/**"
- "data/profiles.schema.json"
- "scripts/validate-profiles.js"
- "scripts/generate-profiles-index.js"
- "package.json"
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
validate-profiles:
name: Validate profile files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Schema validation
run: npm run validate-profiles
- name: minButtons consistency check
run: node scripts/check-minbuttons.js
- name: Index staleness check
run: |
# Regenerate with a fixed timestamp so the diff ignores the `generated` field
SOURCE_DATE_EPOCH=0 npm run generate-profiles-index
git diff --exit-code profiles/index.json || {
echo ""
echo "ERROR: profiles/index.json is stale."
echo "Run 'npm run generate-profiles-index' and commit the result."
exit 1
}