-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.01 KB
/
refresh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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@v4
- 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@v9
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 }}