scarica bollettino ondata calore #2512
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: 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@v2 | |
with: | |
fetch-depth: 0 | |
- name: Configura l'ambiente Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Installa dipendenze | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository ppa:ubuntugis/ppa | |
sudo apt-get update | |
sudo apt-get install -y gdal-bin | |
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 | |
- name: Crea feed RSS | |
run: | | |
cd ./script | |
chmod +x ./rss.sh | |
./rss.sh | |
- 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 |