Update tic #876
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
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/devel')" | |
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 |