-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (48 loc) · 1.69 KB
/
prepare-plot-data.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
53
54
55
name: "prepare-plot-data"
on:
workflow_dispatch:
schedule:
- cron: "0 14 * * *"
push:
branches:
- main
paths:
# - data-truth/COVID-19/**
- data-processed/KIT-simple_nowcast/**
- data-processed/NowcastHub-MeanEnsemble/**
# - data-processed_retrospective/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 1 # otherwise, you will failed to push refs to dest repo
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install requirenments
run: |
pip3 install -r .github/workflows/python_requirements.txt
- name: Prepare forecast data
run: |
cd ./nowcast_viz_de
python3 ./prepare_forecast_data.py
- name: Commit files
env:
AUTH: ${{ secrets.GITHUBTOKEN }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action - RKI Update"
git remote rm origin
git remote add origin https://${AUTH}@github.com/KITmetricslab/hospitalization-nowcast-hub.git > /dev/null 2>&1
git pull origin main
git add --all
git commit --allow-empty -m "Daily plot update"
- name: Push changes
run: |
git push --quiet --set-upstream origin HEAD:main
echo "pushed to github"