Skip to content

chore: refactor all_ontology_generator for cleanliness and modularity #3

chore: refactor all_ontology_generator for cleanliness and modularity

chore: refactor all_ontology_generator for cleanliness and modularity #3

name: Updates to Ontology Files
on:
push:
paths:
- '**/tools/ontology-builder/ontology-references/ontology_info.yml'
branches-ignore:
- main
jobs:
ontology-processing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: ontology changes
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
owl_info:
- 'tools/ontology-builder/ontology-references/owl_info.yml'
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Python cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: install requirements
run: |
pip install -r tools/ontology-builder/requirements.txt
- name: setup git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: owl-processing
if: ${{ steps.filter.outputs.owl_info == 'true' }}
run: |
python3 ./tools/ontology-builder/all_ontology_generator.py
git add ./tools/ontology-builder/ontology-references/all_ontology.json.gz
- name: Commit
if: ${{ steps.filter.outputs.owl_info == 'true' }}
run: |
git commit -m "AUTO: update ontologies"
git push