Skip to content

Bootstrap or Restore renv #1

Bootstrap or Restore renv

Bootstrap or Restore renv #1

Workflow file for this run

# .github/workflows/renv-update.yml
name: Update R dependencies (renv)
on:
schedule:
- cron: "0 6 * * 1" # Mondays at 06:00 UTC
workflow_dispatch:
jobs:
renv-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: r-lib/actions/setup-r@v2
with:
r-version: "release"
- name: Install renv
run: Rscript -e 'install.packages("renv", repos="https://cloud.r-project.org")'
- name: Restore library
run: Rscript -e 'renv::restore(prompt = FALSE)'
- name: Update lockfile
run: Rscript -e 'renv::update(); renv::snapshot(prompt = FALSE, force = TRUE)'
- name: Create PR if changed
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore(renv): update R dependencies and lockfile"
title: "chore(renv): update R dependencies"
body: "Automated weekly update of R packages via renv."
branch: "chore/renv-update"
labels: dependencies,R
reviewers: diogoribeiro7