Scheduled data update #3327
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: Scheduled data update | |
on: | |
schedule: | |
- cron: '5 0,12 * * *' | |
workflow_dispatch: | |
jobs: | |
update-data: | |
name: Update data | |
runs-on: ubuntu-latest | |
container: frefrik/norway-finance-statistics | |
steps: | |
- name: Checkout tools | |
uses: actions/checkout@v4 | |
- name: Configure Git | |
run: git config --global --add safe.directory /__w/norway-finance-statistics/norway-finance-statistics | |
- name: Update data | |
run: python get_rates.py | |
env: | |
FP_USERNAME: ${{ secrets.FP_USERNAME }} | |
FP_PASSWORD: ${{ secrets.FP_PASSWORD }} | |
- name: Update graphs | |
run: python graphs.py | |
- name: Update README | |
run: python update_readme.py --rewrite | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_user_name: GitHub Action | |
commit_user_email: [email protected] | |
commit_author: GitHub Action <[email protected]> | |
commit_message: "Scheduled data update" | |
file_pattern: "data/*.csv img/*.png datasets.json README.md" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |