FT2024-2 WMDS #238
Workflow file for this run
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: 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 |