Skip to content

Commit

Permalink
Workflow de automação para atualização do arquivo x_empresas_contrata…
Browse files Browse the repository at this point in the history
…das.csv
  • Loading branch information
davi-aguiar-vieira committed Aug 3, 2024
1 parent cd86bf0 commit 706fb8a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/contratos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
run: |
git congig --global user.name 'GitHub Actions'
git config --global user.name 'GitHub Actions'
git config --global user.email 'noreply.github.com'
git pull
git pull origin mateus
git add .
git commit -m "Atualização automática: $(date +'%Y-%m-%d %H:%M:%S')" || echo "Nada para commitar"
git push origin mateus
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/contratos_erro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:

- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'noreply.github.com'
git pull
git pull origin mateus
git add .
git commit -m "Atualização automática: $(date +'%Y-%m-%d %H:%M:%S')" || echo "Nada para commitar"
git push origin mateus
40 changes: 40 additions & 0 deletions .github/workflows/empresa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Atualizar Info Empresa

on:
workflow_run:
workflows: ["Atualizar contratos"]
types:
- completed
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 info_empresa.py
run: python Dados/info_empresa.py

- 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 mateus
git add .
git commit -m "Atualização automática: $(date +'%Y-%m-%d %H:%M:%S')" || echo "Nada para commitar"
git push origin mateus

0 comments on commit 706fb8a

Please sign in to comment.