-
Notifications
You must be signed in to change notification settings - Fork 27
50 lines (42 loc) · 1.57 KB
/
bioschemas-build-dump.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
name: dump bio.tools data in a single bioschemas file
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 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: dump bio.tools data in a single bioschemas file
run: |
cd ${{ github.workspace }}/content-ecosystem-utils/scripts/bioschemas
python bioschemas_dump.py
mv ${{ github.workspace }}/content-ecosystem-utils/scripts/bioschemas/bioschemas-dump.ttl ${{ github.workspace }}/content/datasets/
- name: commit new data
env:
GITHUB_USER: ${{ secrets.GITHUB_USER }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ${{ github.workspace }}/content/
git config --local user.email "tpe-bot@github.com"
git config --local user.name "Tools Platform Ecosystem bot"
git add .
if git commit -m "build bioschemas RDF dump on $(date)"; then
git push origin HEAD
echo "successfully created new data"
else
echo "nothing new to add, exiting"
fi