Export Scenepro entities to Artsdata #6
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: Export Scenepro entities to Artsdata | |
on: | |
workflow_dispatch: | |
jobs: | |
transform-scenepro-entities: | |
runs-on: ubuntu-latest | |
container: | |
image: ontotext/refine:1.2.0 | |
options: --user root | |
ports: | |
- 7333:7333 | |
steps: | |
- name: Install requirements | |
id: step-1 | |
run: apk update && apk add curl && apk add util-linux && apk add coreutils | |
- name: Run Onto Refine server | |
id: step-2 | |
run: /opt/ontorefine/dist/bin/ontorefine & | |
- name: Download scenepro entities | |
id: step-3 | |
run: | | |
curl 'https://public-api.scenepro.ca/capacoa/organizations/diffuser/0/200?networkId=2' \ | |
-H "Ocp-Apim-Subscription-Key: 44c4455927594abfb8127ec918b93c73;product=capacoa" >> entities.json | |
- name: Download mapping file | |
id: step-4 | |
run: | | |
curl 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-scenepro/main/ontorefine/mapping.json' >> mapping.json | |
- name: Transform entities in JSON to RDF | |
id: step-5 | |
run: | | |
/opt/ontorefine/dist/bin/ontorefine-cli \ | |
transform entities.json \ | |
-u http://localhost:7333 \ | |
--configurations config.json \ | |
-f json >> scenepro-entities.ttl | |
- name: Commit changes to GitHub | |
id: step-6 | |
run: | | |
git pull | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add scenepro-entities.ttl | |
git commit -m "Add ScenePro entities TTL file" | |
git push |