Fetch Performer and Exhibitions #8
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 Performer and Exhibitions | |
on: | |
workflow_dispatch: | |
jobs: | |
fetch-and-commit-data: | |
runs-on: ubuntu-latest | |
outputs: | |
commit-hash: ${{ steps.get_commit_hash.outputs.commit-hash }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run main script | |
run: | | |
bundle exec ruby src/main.rb performance | |
bundle exec ruby src/main.rb exhibition | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git pull | |
git add outputs | |
git commit -m "Added data generated by the script" | |
git push | |
- name: Get commit hash | |
id: get_commit_hash | |
run: echo "commit-hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
artsdata-push: | |
runs-on: ubuntu-latest | |
needs: fetch-and-commit-data | |
strategy: | |
matrix: | |
include: | |
- artifact: performing-arts | |
file: performance.jsonld | |
- artifact: visual-media-arts | |
file: exhibition.jsonld | |
steps: | |
- name: Action setup | |
uses: culturecreates/[email protected] | |
with: | |
artifact: ${{ matrix.artifact }} | |
publisher: "${{ secrets.PUBLISHER_URI_GREGORY }}" | |
downloadUrl: https://raw.githubusercontent.com/culturecreates/artsdata-planet-osac/${{ needs.fetch-and-commit-data.outputs.commit-hash }}/outputs/${{ matrix.file }} |