Skip to content

Commit

Permalink
Combines all the workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-aravind committed Aug 26, 2024
1 parent c301428 commit 9b9c451
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 105 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Fetch Scenesfrancophones Artists
name: Fetch Scenesfrancophones Entities

on:
workflow_dispatch:
Expand All @@ -15,12 +15,20 @@ jobs:
uses: actions/checkout@v4

- name: curl-jsonld
run: curl https://scenesfrancophones.ca/donneesouvertes/artistes.json > output/artists.jsonld
run: |
curl https://scenesfrancophones.ca/donneesouvertes/evenements.json > output/events.jsonld \
curl https://scenesfrancophones.ca/donneesouvertes/artistes.json > output/artists.jsonld \
curl https://scenesfrancophones.ca/donneesouvertes/lieux.json > output/places.jsonld
- name: combine-jsonld
run : |
cd output
jq -s '[ .[] | .[] ]' artists.jsonld events.jsonld places.jsonld > combined.jsonld
- name: Check for file changes
id: check-changes
run: |
if git status --porcelain | grep -q 'output/artists.jsonld'; then
if git status --porcelain | grep -q 'output/combined.jsonld'; then
echo "HAS_CHANGES=true" >> $GITHUB_OUTPUT
else
echo "HAS_CHANGES=false" >> $GITHUB_OUTPUT
Expand All @@ -32,7 +40,7 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git pull
git add "output/artists.jsonld"
git add output
git commit -m "Add data generated by the script"
git push
Expand All @@ -44,6 +52,6 @@ jobs:
- name: Action setup
uses: culturecreates/[email protected]
with:
artifact: scenesfrancophones-artists
artifact: scenesfrancophones-ca
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}"
downloadUrl: "https://raw.githubusercontent.com/culturecreates/artsdata-planet-scenesfrancophones/main/output/artists.jsonld"
downloadUrl: "https://raw.githubusercontent.com/culturecreates/artsdata-planet-scenesfrancophones/main/output/combined.jsonld"
49 changes: 0 additions & 49 deletions .github/workflows/scenesfrancophones-events.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/scenesfrancophones-places.yml

This file was deleted.

0 comments on commit 9b9c451

Please sign in to comment.