-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.5 KB
/
Copy pathvalidate.yml
File metadata and controls
54 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
name: Validate Data
on:
schedule:
- cron: '0 6 * * *' # daily 06:00 UTC (report only commits when results change)
push:
branches: [main] # also on every push
workflow_dispatch: # and manually
permissions:
contents: write # needed to commit updated report
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install pillow numpy
- name: Run validation
id: validate
run: |
python scripts/validate.py
echo "exit_code=$?" >> $GITHUB_OUTPUT
continue-on-error: true # don't block deploy on warnings
- name: Commit updated validation report
run: |
git config user.name "Open Indus Lab Bot"
git config user.email "bot@open-indus-lab"
git add docs/VALIDATION_REPORT.md
if git diff --staged --quiet; then
echo "No changes to report"
else
git commit -m "Auto-validate: $(date -u '+%Y-%m-%d %H:%M UTC')"
git push
fi
- name: Report status
run: |
if [ "${{ steps.validate.outputs.exit_code }}" != "0" ]; then
echo "::warning::Validation found issues — check docs/VALIDATION_REPORT.md"
else
echo "All validation checks passed"
fi