Skip to content

prepare-plot-data #1729

prepare-plot-data

prepare-plot-data #1729

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"