Skip to content

Revise datapolicy

Revise datapolicy #234

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