feat: process ontology bridge terms #77
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |