Update bank/branch data #464
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: Update bank/branch data | |
on: | |
schedule: | |
- cron: "0 1 * * *" # 1am UTC | |
workflow_dispatch: | |
jobs: | |
update_bank_branch_data: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Update bank/branch data | |
run: | | |
bundle install | |
bundle exec rake bsb:update_bank_branch_data | |
- name: Verify changed files | |
uses: tj-actions/verify-changed-files@v18 | |
id: verify_changed_files | |
with: | |
files: | | |
config/bsb_bank_list.json | |
config/bsb_db.json | |
- name: Bump gem version | |
if: steps.verify_changed_files.outputs.files_changed == 'true' | |
run: bin/bump_gem_version | |
- name: Create pull request | |
if: steps.verify_changed_files.outputs.files_changed == 'true' | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
title: "Update bank/branch data" | |
branch: "update-bank-branch-data" | |
commit-message: "Update bank/branch data" | |
delete-branch: true |