Skip to content

Commit 6e7ca79

Browse files
authored
Add weekly ontology scan workflow
1 parent cc5a97b commit 6e7ca79

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Weekly ontology scan
2+
3+
on:
4+
schedule:
5+
# Every Friday at 23:00 UTC
6+
- cron: "15 23 * * 5"
7+
workflow_dispatch: {}
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
scan:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install dependencies
25+
run: |
26+
python scripts/find_new_ontologies.py
27+
28+
- name: Run scan
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
LOOKBACK_DAYS: "7"
32+
STATE_PATH: "data/state.json"
33+
OUTPUT_PATH: "data/latest.md"
34+
run: |
35+
python scripts/find_new_ontologies.py
36+
37+
- name: Commit report and state
38+
run: |
39+
git config user.name "github-actions"
40+
git config user.email "github-actions@users.noreply.github.com"
41+
git add data/state.json data/latest.md
42+
git diff --staged --quiet || git commit -m "Weekly ontology scan update"
43+
git push

0 commit comments

Comments
 (0)