Bollettini DPC #4340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bollettini DPC | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */4 * * *' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
- name: Installa dependencies | |
run: pip install -r requirements.txt | |
- name: Scarica i dati della Protezione Civile e li trasforma in CSV | |
run: python script.py | |
- name: Commit e Push se ci sono dati nuovi | |
run: |- | |
git config user.name "automatico" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
timestamp=$(date --iso-8601=seconds) | |
git commit -m "Aggiornamento bollettini DPC : ${timestamp}" || exit 0 | |
git push |