-
Notifications
You must be signed in to change notification settings - Fork 239
62 lines (62 loc) · 2.19 KB
/
pr-commands.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
issue_comment:
types: [created]
name: Commands
jobs:
document:
if: startsWith(github.event.comment.body, '/document')
name: document
runs-on: ubuntu-18.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: r-lib/actions/setup-r@v2
- name: Install dependencies
run: |
options(repos = c(CRAN = "https://demo.rstudiopm.com/all/__linux__/bionic/latest"))
install.packages(c("remotes", "roxygen2"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Document
run: Rscript -e 'roxygen2::roxygenise()'
- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add man/\* NAMESPACE
git commit -m 'Document'
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
i18n:
if: startsWith(github.event.comment.body, '/i18nize')
name: i18nize
runs-on: ubuntu-18.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: r-lib/actions/setup-r@v2
- name: Install dependencies
run: |
options(repos = c(CRAN = "https://demo.rstudiopm.com/all/__linux__/bionic/latest"))
install.packages(c("cli", "here", "purrr", "stringi", "yaml"))
shell: Rscript {0}
- name: Internationalize
run: Rscript data-raw/i18n_translations.R
- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit inst/internals/i18n* -m 'Re-build internal internationalization data' || echo "No changes to commit"
git push origin || echo "No changes to commit"
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}