Added a GH action #1
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: Tests | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- **/*.ttl | ||
jobs: | ||
lint: | ||
name: Extract SPARQL files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Extract | ||
run: python scripts/transformDotTtlToDotSparql.py | ||
- name: Commit new .rq files | ||
run: | | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email '[email protected]' | ||
git add . | ||
if git diff --exit-code --staged; then | ||
echo "No changes" | ||
else | ||
git pull | ||
git commit -m 'Updated .rq files' | ||
git push | ||
fi |