-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1014 Bytes
/
validate-export.yml
File metadata and controls
40 lines (35 loc) · 1014 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
34
35
36
37
38
39
40
name: validate-export
on:
pull_request:
paths:
- "tactics/**"
- "techniques/**"
- "tools/export_json.py"
- "tools/oak.json"
- ".github/workflows/validate-export.yml"
push:
branches: [main]
paths:
- "tactics/**"
- "techniques/**"
- "tools/export_json.py"
permissions:
contents: read
jobs:
export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run export_json.py and verify oak.json is up to date
run: |
python tools/export_json.py --out tools/oak.json
if ! git diff --quiet -- tools/oak.json; then
echo "::error::tools/oak.json is stale. Run 'python tools/export_json.py' locally and commit the result."
git --no-pager diff tools/oak.json
exit 1
fi
echo "OK: tools/oak.json matches the generated output."