Skip to content

.github/workflows/italy.yml #1964

.github/workflows/italy.yml

.github/workflows/italy.yml #1964

Workflow file for this run

name: Fetch latest Italian data
on:
repository_dispatch:
schedule:
- cron: '0 2 * * *'
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 Italian data
run: |-
mkdir -p italy
cd italy
wget -q -O italy.csv "https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-regioni/dpc-covid19-ita-regioni.csv"
- name: Commit and push Italian 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 Italian data: ${timestamp}" || exit 0
git push