Skip to content

Updating 3 times per day #457

Updating 3 times per day

Updating 3 times per day #457

Workflow file for this run

name: Fetch exchange rates
on:
push:
branches: [ "main" ]
workflow_dispatch:
schedule:
- cron: "0 0,8,16 * * *"
env:
APP_ID: ${{ secrets.APP_ID }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch fiat
run: curl -X GET "https://openexchangerates.org/api/latest.json?app_id=${{ secrets.APP_ID }}" --output fiat-rates.json
- name: Fetch crypto
run: curl -X GET "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd" --output crypto-rates.json
- name: Push into Git
run: |-
git config --global user.email "bot@ark-builders.dev"
git config --global user.name "ARK Builders Bot"
git add fiat-rates.json
git add crypto-rates.json
git commit -m "Automated update of rates"
git push