-
Notifications
You must be signed in to change notification settings - Fork 22
41 lines (37 loc) · 1.19 KB
/
generateTTLandCommit.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
name: generate-ttl-and-commit
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install rdflib
pip install requests
pip install testtools
- name: Generate and commit ttl to PR branch
run: |
python3 -m scripts.makeWMDREntities
git status
git add ./\*.ttl
if [ -z "$(git status --porcelain)" ];
then echo 'nothing to commit'
else
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git commit -am 'Github Action Commit'
git push origin HEAD:${{ github.head_ref }}
fi