scarica bollettino ondata calore #2693
This file contains hidden or 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: scarica bollettino ondata calore | |
| on: | |
| repository_dispatch: | |
| schedule: | |
| - cron: "3 0-7/2 * * *" | |
| - cron: "3 8-11 * * *" | |
| - cron: "3 11-23/2 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| scheduled: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout del repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configura l'ambiente Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| # cache: 'pip' | |
| - name: Installa dipendenze | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y software-properties-common gdal-bin | |
| pip install --upgrade pip | |
| pip install yq | |
| - name: Prepara gli strumenti | |
| run: | | |
| mkdir -p ~/bin | |
| cp bin/scrape bin/mlr bin/mlrgo ~/bin/ | |
| chmod +x ~/bin/scrape ~/bin/mlr ~/bin/mlrgo | |
| echo "$HOME/bin" >> $GITHUB_PATH | |
| - name: Scarica i dati | |
| run: | | |
| chmod +x ./ondate-calore.sh | |
| ./ondate-calore.sh | |
| continue-on-error: false | |
| - name: Crea feed RSS | |
| run: | | |
| cd ./script | |
| chmod +x ./rss.sh | |
| ./rss.sh | |
| continue-on-error: false | |
| - name: Committa e pusha le modifiche | |
| 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 bollettino: ${timestamp}" || exit 0 | |
| git push |