Explorar el Código

[ci] Auto update tic and add "status-update" dispatch event

tags/v0.3.3
Garrick Aden-Buie hace 5 años
padre
commit
5ad908ad54
Se han modificado 2 ficheros con 60 adiciones y 1 borrados
  1. +7
    -1
      .github/workflows/main.yml
  2. +53
    -0
      .github/workflows/update-tic.yml

+ 7
- 1
.github/workflows/main.yml Ver fichero

@@ -6,7 +6,7 @@ on:
# weekly Monday morning
- cron: "0 6 * * 1"

name: CI by {tic}
name: R CMD Check

jobs:
R-CMD-check:
@@ -174,3 +174,9 @@ jobs:
- name: "[Stage] After Deploy"
run: Rscript -e "tic::after_deploy()"

- name: Update status dashboard at gadenbuie/status
uses: peter-evans/repository-dispatch@v1
if: github.ref == 'refs/heads/HEAD' && matrix.config.os == 'macOS-latest' && matrix.config.r == 'release'
with:
token: ${{ secrets.TIC_UPDATE }}
event-type: status-update

+ 53
- 0
.github/workflows/update-tic.yml Ver fichero

@@ -0,0 +1,53 @@
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 4 * * *"

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@v2.3.1
with:
persist-credentials: false

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}
Ncpus: 4

- name: "[Stage] Dependencies"
run: |
sudo apt install libcurl4-openssl-dev libsodium-dev libharfbuzz-dev libfribidi-dev
Rscript -e "if (!requireNamespace('remotes')) install.packages('remotes', type = 'source')"
Rscript -e "remotes::install_github('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@v3
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
base: master

Cargando…
Cancelar
Guardar