Skip to content

Update Translation maps #13

Update Translation maps

Update Translation maps #13

name: Update Translation maps
on:
workflow_dispatch:
schedule:
- cron: '0 8 1 * *' #8AM first of the month
jobs:
update-translation-maps:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/umich_catalog_indexing/Gemfile
steps:
- uses: actions/checkout@v4
- name: Set up ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Fetch Floor locations Translation map
working-directory: ./umich_catalog_indexing
env:
FLOOR_LOCATION_SPREADSHEET_ID: ${{ vars.FLOOR_LOCATION_SPREADSHEET_ID }}
GOOGLE_API_CREDENTIALS: ${{ secrets.GOOGLE_API_CREDENTIALS }}
run: bundle exec ruby bin/generate_translation_map.rb --force floor_location
- name: Fetch Electronic Collections Translation map
working-directory: ./umich_catalog_indexing
env:
ALMA_API_KEY: ${{ secrets.ALMA_API_KEY }}
run: bundle exec ruby bin/generate_translation_map.rb --force electronic_collections
- name: Get PR title
run: echo "PR_TITLE=$(date +'%B %Y') translation map update" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "config: update translation map(s)"
title: ${{ env.PR_TITLE }}
reviewers: niquerio