Update rates #1388
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 rates | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '34 */12 * * *' | |
jobs: | |
date: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Update rates | |
run: | | |
RATES_URL="${{ secrets.RATES_URL }}" node cron | |
- name: Setup git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Commit | |
run: | | |
git add data/rates.json | |
git commit -m "Update rates" | |
git push origin main |