aggiorna dati #264
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: aggiorna dati | |
on: | |
repository_dispatch: | |
schedule: | |
- cron: "5 4 * * *" | |
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 | |
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 | |
- name: Prepara gli strumenti | |
run: | | |
mkdir -p ~/bin | |
cp bin/{scrape,mlr,mlrgo,duckdb} ~/bin/ | |
chmod +x ~/bin/{scrape,mlr,mlrgo,duckdb} | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Esegui lo script base | |
run: | | |
cd ./script | |
chmod +x ./rete_ricarica_veicoli_elettrici.sh | |
./rete_ricarica_veicoli_elettrici.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 dati: ${timestamp}" || exit 0 | |
git push |