crea archivio jiku_istat #3
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: crea archivio jiku_istat | |
on: | |
repository_dispatch: | |
schedule: | |
- cron: '10 6 * * MON' | |
workflow_dispatch: | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Utilizza l'action github checkout@v3, per automatizzare il check-out | |
uses: actions/checkout@v3 | |
- name: crea cartella utente bin, copia dentro l'eseguibile di miller | |
run: |- | |
mkdir -p ~/bin | |
cp bin/mlr ~/bin | |
cd ~/bin | |
chmod +x mlr | |
- name: scarica i dati | |
run: |- | |
export PATH=$PATH:~/bin | |
chmod +x ./script/jiku_istat/jiku_istat.sh | |
./script/jiku_istat/jiku_istat.sh | |
- name: Committa e pusha se ci sono variazioni nei dati | |
run: |- | |
git config user.name "automatico" | |
git config user.email "[email protected]" | |
git add -A | |
timestamp=$(date --iso-8601=seconds) | |
git commit -m "Data e ora aggiornamento: ${timestamp}" || exit 0 | |
git push |