build bioschemas jsonld from bio.tools files #323
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: build bioschemas jsonld from bio.tools files | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" | |
jobs: | |
build-bioschemas: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: content | |
- uses: actions/checkout@v2 | |
with: | |
repository: bio-tools/content-ecosystem-utils | |
path: content-ecosystem-utils | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: pip install -r ${{ github.workspace }}/content-ecosystem-utils/scripts/bioschemas/requirements.txt | |
- name: publish bio.tools data as bioschemas files | |
run: | | |
cd ${{ github.workspace }}/content-ecosystem-utils/scripts/bioschemas | |
python biotools_to_bioschemas.py | |
- name: commit all changes | |
env: | |
GITHUB_USER: ${{ secrets.GITHUB_USER }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd ${{ github.workspace }}/content/data | |
git config --local user.email "[email protected]" | |
git config --local user.name "Tools Platform Ecosystem bot" | |
git add -A | |
if git commit -m "build bioschemas on $(date)"; then | |
git push origin HEAD | |
echo "successfully created new data" | |
else | |
echo "nothing new to add, exiting" | |
fi |