Skip to content

Hook dependency updates #70

Hook dependency updates

Hook dependency updates #70

on:
schedule:
- cron: '50 8 1,15 * *'
workflow_dispatch:
name: Hook dependency updates
jobs:
hook-dependencies-update:
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
# - name: Cache packages
# uses: actions/cache@v3
# with:
# path: ${{ env.RENV_PATHS_ROOT }}
# key: renv-${{ hashFiles('**/renv.lock') }}
# restore-keys: |
# renv-
- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "install.packages('remotes'); remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: install runtime dependencies
run: Rscript -e "install.packages(c('renv', 'jsonlite'))"
- name: update PPM URL
run: Rscript inst/update-ppm-url.R
- name: update dependency graph among packages
run: Rscript inst/update-existing-hook-dependencies.R
- name: update existing packages
run: Rscript inst/update-dependency-graph-existing-packages.R
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6.0.4
with:
token: ${{ secrets.PRECOMMIT_HOOK_DEPENDENCY_UPDATE }}
commit-message: Update renv dependencies
branch: hook-dependencies-update
delete-branch: true
assignees: lorenzwalthert
title: 'Hook dependencies update'
body: |
This PR updates the hook dependencies in `renv.lock`, auto-generated by [create-pull-request][1]. Close and re-open this to trigger `on: pull_request` events to circumvent [limitation of GitHub actions](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#push-pull-request-branches-to-a-fork).
[1]: https://github.com/peter-evans/create-pull-request