-
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (48 loc) · 1.37 KB
/
update_rki.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: daily RKI update and processing
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "*/5 6-20 * * 1-5"
jobs:
update_page:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: update apt
run: sudo apt-get update
- name: install gnuplot
run: sudo apt-get install -y fonts-linuxlibertine gnuplot
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install requests pandas
- name: scrape and process RKI data
run: |
cd scraper
env python3 ./rki_scraper.py
env python3 ./rki_processing.py
cd ../
- name: update graphs
run: |
cd gnuplot/
./update_graphs.sh
cd ../
- name: commit files
run: |
git config --local user.name ${{ github.actor }}
git add ./data/*.csv
git add ./plots_de/*.png
git add ./plots_en/*.png
git diff-index --quiet HEAD || git commit -m "daily RKI update and processing"
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true