update-data #388
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: | |
- cron: "30 4 * * *" | |
workflow_dispatch: | |
name: update-data | |
jobs: | |
render: | |
name: update-data | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v1 | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
- uses: r-lib/actions/setup-pandoc@v1 | |
- name: Instalando libs de sistema | |
run: | | |
sudo apt update | |
sudo apt install libudunits2-dev libgdal-dev | |
sudo apt install libprotobuf-dev protobuf-compiler | |
sudo apt install libjq-dev | |
sudo add-apt-repository ppa:cran/libgit2 | |
sudo apt-get install libgit2-dev | |
sudo apt-get install libcurl4-openssl-dev | |
sudo apt-get install libssl-dev | |
sudo apt-get install libxml2-dev | |
- name: Execute Script | |
run: | | |
Rscript data-raw/atualizar_dados.R | |
- name: Commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add . || echo "Sem alteracoes" | |
git commit -m 'Atualizando dados' || echo "Sem alteracoes" | |
git push origin || echo "Sem alteracoes" |