ETL CotAI #155
This file contains hidden or 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
| name: ETL CotAI | |
| on: | |
| schedule: | |
| - cron: '0 9 * * *' # Executa todo dia às 9:00 UTC | |
| workflow_dispatch: | |
| jobs: | |
| run-etl: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install requirements | |
| run: pip3 install -r requirements.txt | |
| - name: Run ETL Pipeline + LLM | |
| env: | |
| API_KEY: ${{ secrets.API_KEY }} | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| run: python cotai/pipeline.py | |
| - name: Commit and push changes | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "github-actions" | |
| git add . | |
| if git diff --staged --quiet; then | |
| echo "Sem alterações para commitar" | |
| else | |
| git commit -m "ETL att: $(date)" | |
| git push | |
| fi |