Fetch Evenko entities #3
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: Fetch Evenko entities | |
on: | |
workflow_dispatch: | |
jobs: | |
process-using-ontorefine: | |
runs-on: ubuntu-latest | |
container: | |
image: ontotext/refine:1.2.1 | |
options: --user root | |
ports: | |
- 7333:7333 | |
steps: | |
- name: Install requirements | |
run: apk update && apk add curl && apk add util-linux && apk add jq | |
- name: Run ontorefine server | |
run: /opt/ontorefine/dist/bin/ontorefine & | |
- name: Download project-configuration-file | |
run: | | |
curl 'https://raw.githubusercontent.com/${{github.repository}}/${{github.ref}}/ontorefine-config.json' >> config.json | |
- name: Fetch entities | |
run: | | |
curl https://evenko.ca/en/feeds/venue/place-bell -o data.json | |
- name: Transform into RDF | |
run: | | |
mkdir -p outputs | |
/opt/ontorefine/dist/bin/ontorefine-cli \ | |
transform data.json \ | |
-u http://localhost:7333 \ | |
--configurations config.json \ | |
-f json >> outputs/events.ttl | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ttl-file | |
path: outputs/ | |
commit-and-push: | |
runs-on: ubuntu-latest | |
needs: process-using-ontorefine | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
id: download-step | |
uses: actions/download-artifact@v4 | |
with: | |
name: ttl-file | |
path: outputs/ | |
- name: Commit files to GitHub | |
run: | | |
git pull | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add "outputs/" | |
git commit -m "Push Entities from Evenko" | |
git push | |
artsdata-push: | |
runs-on: ubuntu-latest | |
needs: commit-and-push | |
steps: | |
- name: Action setup | |
uses: culturecreates/artsdata-pipeline-action@v2 | |
with: | |
artifact: evenko-ca | |
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}" | |
downloadUrl: https://raw.githubusercontent.com/${{github.repository}}/${{github.ref}}/outputs/events.ttl | |