Scheduled data update #2401
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 * * *' | |
jobs: | |
update-data: | |
name: Update data | |
runs-on: ubuntu-latest | |
container: frefrik/norway-finance-statistics | |
steps: | |
- name: Checkout tools | |
uses: actions/checkout@v2 | |
- 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: EndBug/add-and-commit@v4 | |
with: | |
author_name: GitHub Action | |
author_email: [email protected] | |
message: "Scheduled data update" | |
add: "data/*.csv img/*.png datasets.json README.md" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |