-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (50 loc) · 1.6 KB
/
generate_all_ontology.yml
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
name: Updates to Ontology Files
on:
push:
paths:
- "**/asset-schemas/ontology_info_schema.json"
- "**/asset-schemas/all_ontology_schema.json"
- "**/ontology-assets/ontology_info.json"
- "**/tools/ontology-builder/src/all_ontology_generator.py"
branches-ignore:
- main
jobs:
ontology-processing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Python cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: install requirements
run: |
cd tools/ontology-builder
pip install -r requirements.txt
- name: setup git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: ontology-processing
run: |
python3 ./tools/ontology-builder/src/all_ontology_generator.py
git add ./ontology-assets/*.json.gz
git add ./ontology-assets/ontology_info.json
- name: update API
run: |
echo "${{ github.sha }}" > ./api/python/ontology-assets-version.txt
git add ./api/python/ontology-assets-version.txt
- name: Commit
run: |
git commit -m "AUTO: update ontologies"
git push