Actualizar Modelos #107
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
name: Actualizar Modelos | |
on: | |
workflow_run: | |
workflows: ["Preprocesar Datos"] | |
types: | |
- completed | |
workflow_dispatch: # Permite ejecución manual | |
jobs: | |
actualizar-modelos: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configurar Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Instalar dependencias | |
run: | | |
python -m pip install --upgrade pip | |
pip install pandas scikit-learn | |
- name: Entrenar y Actualizar Modelos | |
run: python ./codigo/routines/entrenar_modelos.py -y 2022 2026 | |
- name: Configurar Git | |
run: | | |
git config --global user.name 'matuteiglesias' | |
git config --global user.email 'matuteiglesias@gmail.com' | |
- name: Commit y push de los nuevos modelos | |
run: | | |
git add -f ./modelos/* | |
git commit -m "Add updated models" | |
git push origin main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |