-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (42 loc) · 1.65 KB
/
update-tic.yml
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
46
47
48
49
50
51
52
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 4 * * 0" # every week
name: Update tic
jobs:
update-tic:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, r: "release" }
env:
# use GITHUB_TOKEN from GitHub to workaround rate limits in {remotes}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
Ncpus: 4
- name: "[Stage] Dependencies"
run: |
Rscript -e "install.packages('pak', repos = 'https://r-lib.github.io/p/pak/stable')"
Rscript -e "if (grepl('Ubuntu', Sys.info()[['version']])) {options(repos = c(CRAN = sprintf('https://packagemanager.rstudio.com/all/__linux__/%s/latest', system('lsb_release -cs', intern = TRUE))))}; pak::pkg_install('ropensci/tic', dependencies = TRUE)"
- name: "[Stage] Update YAMLs"
run: |
Rscript -e "tic::update_yml()"
- name: "[Stage] Create Pull Request"
uses: peter-evans/create-pull-request@v4
with:
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
token: ${{ secrets.TIC_UPDATE }}
title: "Update tic templates [ci-skip]"
commit-message: "update tic templates"
body: "{tic} templates can be updated :rocket: :robot:"
branch: update-tic