Skip to content

Estrutura ANAC

Estrutura ANAC #19

Workflow file for this run

name: Estrutura ANAC
on:
workflow_dispatch:
jobs:
download-file:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Baixar arquivo JSON da API
uses: githubocto/flat@v4
with:
# A URL da API
http_url: 'https://estruturaorganizacional.dados.gov.br/doc/estrutura-organizacional/completa.json?codigoPoder=1&codigoEsfera=1&codigoUnidade=86144&retornarOrgaoEntidadeVinculados=SIM'
downloaded_filename: 'anac/estrutura.json'
# NOVO E IMPORTANTE: Garante que o JSON seja salvo em seu formato original, sem processamento.
flatten: 'false'
- name: Commit e push de arquivos, se houver mudanças
run: |
git config user.name github-actions
git config user.email [email protected]
git add :/
COMMIT_MESSAGE="$(date +"%Y-%m-%d %H:%M")"
git commit -m "$COMMIT_MESSAGE" || exit 0
git pull --rebase
git push