check_calendar_flow #499
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
on: | |
schedule: | |
- cron: "0 13 * * 1,2,3,4,5" | |
workflow_dispatch: | |
name: check_calendar_flow | |
jobs: | |
run-r-script: | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install rmarkdown | |
run: Rscript -e 'install.packages("rmarkdown")' | |
- name: Install distill | |
run: Rscript -e 'install.packages("distill")' | |
- name: Install googlesheets4 | |
run: Rscript -e 'install.packages("googlesheets4")' | |
- name: Install tidyverse | |
run: Rscript -e 'install.packages("tidyverse")' | |
- name: Install devtools | |
run: Rscript -e 'install.packages("devtools")' | |
- name: Correr script calendar | |
env: | |
CALENDAR_PATH: ${{ secrets.CALENDAR_PATH }} | |
run: | | |
Rscript ".github/source/check_calendar_items.R" | |
- name: Commit results | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add -A | |
git commit -m "Actualizo eventos en calendario" || echo "No changes to commit" | |
git push origin || echo "No changes to commit" |