download-sigbm #93
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
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "15 12 * * *" | |
workflow_dispatch: | |
branches: [main, master] | |
name: download-sigbm | |
jobs: | |
download: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch latest data | |
run: |- | |
curl -X POST -d "" https://app.anm.gov.br/SIGBM/Publico/ClassificacaoNacionalDaBarragem/ExportarExcel --output data-raw/sigbm_download_`date +"%Y-%m-%d"`.xlsx | |
- name: commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Beatriz Milz" | |
git add . | |
git commit -m 'Update data' || echo "Update data" | |
git push origin || echo "Update data" |