Skip to content

Collect exchange rates #338

Collect exchange rates

Collect exchange rates #338

Workflow file for this run

name: Collect exchange rates
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 3 * * MON"
jobs:
exchange_rates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update repository
run: |
cd $GITHUB_WORKSPACE
git config user.email "[email protected]"
git config user.name "Firefly III build robot"
echo $(date '+%d-%m-%Y %T %Z') > date.txt
git add date.txt
git commit -m "Auto commit on $(date '+%d-%m-%Y') [skip ci]"
git push
- name: Download rates
run: |
set -euo pipefail
composer install
php -v
mkdir result
mkdir rates
php run.php ${{ secrets.CurrencyList }} && curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/780328c5-008e-4ede-a2fe-bba77e6e0a6f
env:
API_LAYER_KEY: ${{ secrets.AccessKey }}
EXCHANGE_RATE_KEY: ${{ secrets.ExchangeRateAccessKey }}
- name: Upload
uses: bacongobbler/azure-blob-storage-upload@main
with:
source_dir: rates
container_name: $web
connection_string: ${{ secrets.ConnectionString }}
# extra_args: '--pattern *.json'
# WARNING: this will overwrite existing blobs in your blob storage
overwrite: true