Updates ics calendar #271
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: Updates ics calendar | |
on: | |
#push: | |
workflow_dispatch: | |
schedule: | |
- cron: '5 0 * * 5' | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v4 | |
- name: Install curl | |
run: |- | |
apt-get update && apt-get -y install curl | |
- name: Install R packages | |
run: |- | |
Rscript -e "renv::restore()" | |
- name: Download and treat | |
run: |- | |
Rscript ecb.R | |
- name: Commit and push if it changed | |
run: |- | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
git config user.name "Automatic" | |
git config user.email "actions@users.noreply.github.com" | |
git add docs/ | |
timestamp=$(date -u) | |
git commit -m "Automatic update of ics calendar: ${timestamp}" || exit 0 | |
git push | |
container: rocker/tidyverse:4.3.0 |