Skip to content

Atualizar_contratos_21_22 #9

Atualizar_contratos_21_22

Atualizar_contratos_21_22 #9

name: Atualizar_contratos_21_22
on:
schedule:
- cron: '0 16 1 * *'
workflow_dispatch:
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run update script 2021-2022
run: python Dados/Coleta_dados/coleta_api.py "20210102" "20220101" "w" "[\n" ","
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'noreply.github.com'
git pull origin main
git add .
git commit -m "Atualização automática: $(date +'%Y-%m-%d %H:%M:%S')" || echo "Nada para commitar"
git push origin main