Skip to content

Data update

Data update #4319

Workflow file for this run

name: Data update
on:
workflow_dispatch: # allow for manual trigger
schedule:
# These hours are in UTC. i.e. result in a different local time in Germany,
# either +1 hour (winter) or +2 hours (summer).
- cron: "0 0,8,12,15,20 * * *"
jobs:
scheduled-data-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: 1) pip-install deps
run: pip install -r tools/env/python-deps.txt
- name: 2) auto-update.sh
id: auto-update-script
env:
# Set GITHUB_TOKEN for `hub` CLI -- `secrets.GITHUB_TOKEN` is a magic
# secret containing temporary credentials automatically generated by
# GitHub for each workflow run. Privileges are documented here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZEIT_JSON_URL: ${{ secrets.ZEIT_JSON_URL }}
RISKLAYER_HISTORY_CASES_CSV_URL: ${{ secrets.RISKLAYER_HISTORY_CASES_CSV_URL }}
RISKLAYER_HISTORY_DEATHS_CSV_URL: ${{ secrets.RISKLAYER_HISTORY_DEATHS_CSV_URL }}
AG_RKI_SUMS_QUERY_BASE_URL: ${{ secrets.AG_RKI_SUMS_QUERY_BASE_URL }}
run: bash tools/auto-update.sh
- name: 3) merge PR
id: merge-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Review behavior for a while, then auto-merge (probably):
# https://stackoverflow.com/a/61474512/145400
#
run: |
echo "PR URL: ${{ steps.auto-update-script.outputs.pr_url }}"
echo "PR ID: ${{ steps.auto-update-script.outputs.pr_id }}"
hub api -XPUT "repos/jgehrcke/covid-19-germany-gae/pulls/${{ steps.auto-update-script.outputs.pr_id }}/merge"