Update creator.md #292
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: Template | |
on: | |
push: | |
branches-ignore: | |
- main | |
jobs: | |
template: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Check if RDF files modified | |
id: rdfModified | |
uses: dorny/paths-filter@v3 | |
with: | |
base: ${{ github.ref }} | |
list-files: csv | |
filters: | | |
modified: | |
- '**.ttl' | |
- '**.jsonld' | |
- '**.trig' | |
- '**.nt' | |
- '**.nq' | |
- '**.rdf' | |
- '**.trix' | |
- name: RDF syntax check | |
if: steps.rdfModified.outputs.modified == 'true' | |
uses: AtomGraph/[email protected] | |
- name: Check if config modified | |
id: configModified | |
uses: dorny/paths-filter@v3 | |
with: | |
base: ${{ github.ref }} | |
list-files: csv | |
filters: | | |
modified: | |
- 'config/**' | |
- name: Template | |
if: steps.rdfModified.outputs.modified == 'true' || steps.configModified.outputs.modified == 'true' | |
run: | | |
docker run --rm \ | |
--pull=always \ | |
-v /$(pwd)/config:/config \ | |
-v /$(pwd)/shapes:/shapes \ | |
-v /$(pwd)/doc/gen/:/doc/gen ghcr.io/skemu/rdf-template:latest | |
- name: Configure Git User | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "GitHub Actions" | |
- name: Commit and push | |
if: steps.rdfModified.outputs.modified == 'true' || steps.configModified.outputs.modified == 'true' | |
run: | | |
git status | |
git add doc/gen/ | |
git status | |
git diff --staged --quiet || git commit -F- <<EOF | |
Apply templates | |
The following RDF files were modified: | |
${{ steps.rdfModified.outputs.modified_files }} | |
The following config files were modified: | |
${{ steps.configModified.outputs.modified_files }} | |
EOF | |
git push | |
- name: No templateable changes | |
if: steps.rdfModified.outputs.modified == 'false' && steps.configModified.outputs.modified == 'false' | |
run: echo "No changes to template" |