Skip to content

Fetch Currency Rates (against USD, hourly) #12258

Fetch Currency Rates (against USD, hourly)

Fetch Currency Rates (against USD, hourly) #12258

Workflow file for this run

name: Fetch Currency Rates (against USD, hourly)
on:
schedule:
- cron: "0 * * * *"
env:
API_KEY: ${{ secrets.CURRENCY_BEACON_API_KEY }}
jobs:
run_script:
name: Run fetch-rates.sh
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run script
run: |
chmod +x fetch-rates.sh
./fetch-rates.sh
- name: Commit files
run: |
timestamp=$(date "+%Y-%m-%d %H:%M:%S")
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git commit -m "๐Ÿ—ƒ๏ธ updated currency-rates.json ($timestamp)" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}