Extract Bioschemas #87
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: Extract Bioschemas | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" | |
push: | |
paths: | |
- '*.groovy' | |
jobs: | |
bioschemas: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Install groovy | |
run: | | |
sudo apt update | |
sudo apt install groovy openjdk-17-jre-headless | |
- name: Extract Bioschemas | |
run: | | |
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/ | |
groovy -version | |
groovy extractBioschemas.groovy > datasets.ttl | |
groovy extractBioschemas_KB.groovy > biomax.ttl | |
- name: Commit Turtle | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
git add *.ttl | |
if git diff --exit-code --staged; then | |
echo "No changes" | |
else | |
git commit -m 'Extracted new Bioschemas data as Turtle' | |
git push | |
fi |