Actualizacion Evaluaciones Cohorte #347
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: Actualizacion Evaluaciones Cohorte | |
| on: | |
| schedule: | |
| - cron: '0 13 * * *' # Corre todos los días a las 13:00 UTC | |
| workflow_dispatch: | |
| jobs: | |
| Actualizacion-Evaluaciones-Cohorte: | |
| name: Actualizacion Evaluaciones Cohorte | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| GITHUB_PAT: ${{ secrets.TOKEN_USUARIO_JESI }} | |
| GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.AUTENTICACION_NO_INTERACTIVA }} | |
| GSHEET_INFORMACION_COHORTES: ${{ secrets.GSHEET_INFORMACION_COHORTES }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-r@v2 | |
| - name: Install libcurl and libssl on Linux | |
| run: 'sudo apt-get -y install libcurl4-openssl-dev' | |
| shell: bash | |
| - name: Install CRAN packages | |
| run: Rscript -e 'install.packages(c("googlesheets4", "googledrive", "dplyr", "tidyr", "lubridate", "stringr"))' | |
| - name: Run R script | |
| run: | | |
| source('R/evaluaciones_cohorte.R') | |
| shell: Rscript {0} | |
| - name: Check for error file | |
| id: check_error | |
| run: | | |
| if [ -f "error_github_issue.txt" ]; then | |
| echo "Planilla no encontrada. Creando un Issue en GitHub..." | |
| echo "error=true" >> $GITHUB_ENV | |
| else | |
| echo "error=false" >> $GITHUB_ENV | |
| fi | |
| - name: Create GitHub Issue | |
| if: env.error == 'true' | |
| uses: peter-evans/create-issue-from-file@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| title: "Error: Planilla Integrada no creada" | |
| content-filepath: error_github_issue.txt | |
| labels: error, automatización |