Skip to content

.github/workflows/belgium.yml #1956

.github/workflows/belgium.yml

.github/workflows/belgium.yml #1956

Workflow file for this run

name: Fetch latest Belgian data
on:
repository_dispatch:
schedule:
- cron: '30 1 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: actions/cache@v1
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Fetch latest Belgian data
run: |-
mkdir -p belgium
cd belgium
wget -q -O belgium.csv "https://epistat.sciensano.be/Data/COVID19BE_MORT.csv"
- name: Commit and push Belgian data if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest Belgian data: ${timestamp}" || exit 0
git push