forked from vivo-ontologies/vivo-ontology
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge branch 'master' of https://github.com/hauschke/vivo-ont…
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Validate vivo.owl | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'vivo.owl' # Trigger only when vivo.owl is changed | ||
workflow_dispatch: # Allow manual triggering | ||
|
||
<<<<<<< HEAD | ||
permissions: | ||
contents: read | ||
pull-requests: write # Allow writing comments to pull requests | ||
|
||
======= | ||
>>>>>>> parent of 3711550 (Update validate_rdf.yml) | ||
jobs: | ||
validate-rdf: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Download Apache Jena | ||
- name: Download Apache Jena | ||
run: | | ||
wget https://dlcdn.apache.org/jena/binaries/apache-jena-5.2.0.tar.gz -O apache-jena.tar.gz | ||
tar -xzf apache-jena.tar.gz | ||
# Validate vivo.owl | ||
- name: Validate RDF | ||
run: | | ||
$GITHUB_WORKSPACE/apache-jena-5.2.0/bin/riot --validate vivo.owl > $GITHUB_WORKSPACE/validation_report.txt || true | ||
if [ ! -s $GITHUB_WORKSPACE/validation_report.txt ]; then | ||
echo "No validation errors found." > $GITHUB_WORKSPACE/validation_report.txt | ||
fi | ||
cat $GITHUB_WORKSPACE/validation_report.txt | ||
# Post validation report to PR | ||
- name: Post validation report to PR | ||
if: github.event_name == 'pull_request' | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: Validation Report for vivo.owl | ||
path: ${{ github.workspace }}/validation_report.txt | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Ensure the token is passed as an environment variable |