-
Notifications
You must be signed in to change notification settings - Fork 17
45 lines (37 loc) · 1.11 KB
/
update_dependencies.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Update R packages
on: workflow_dispatch
jobs:
renv:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/repo_rt_preprocessing:latest
env:
RENV_PATHS_LIBRARY: '/renv/library'
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Init renv
shell: Rscript {0}
run: |
renv::restore()
- name: Install R dependencies
run: Rscript scripts/R_ci/dependencies.R
- name: Snapshot renv
shell: Rscript {0}
run: |
renv::snapshot()
- name: Commit
run: |
git config --global user.email '[email protected]'
git config --global user.name 'Github Actions'
# Use LFS storage of main repository: no push access to fork LFS storage
git add renv.lock renv .Rprofile
git commit -m "Update renv"
git lfs push origin HEAD # first push LFS, otherwise failure because of lfs.url
git push origin HEAD
- name: Debug with tmate on failure
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3