@@ -11,82 +11,8 @@ name: Run roxygen2 on R package bican.mccarroll.helloworld and commit changes
1111permissions : read-all
1212
1313jobs :
14- document :
15- if : ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
16- name : document
17- runs-on : ubuntu-latest
18- env :
19- GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
20- permissions :
21- contents : write
22- steps :
23- - uses : actions/checkout@v4
24-
25- - uses : r-lib/actions/pr-fetch@v2
26- with :
27- repo-token : ${{ secrets.GITHUB_TOKEN }}
28-
29- - uses : r-lib/actions/setup-r@v2
30- with :
31- use-public-rspm : true
32-
33- - uses : r-lib/actions/setup-r-dependencies@v2
34- with :
35- working-directory : R/bican.mccarroll.helloworld
36- extra-packages : any::roxygen2
37- needs : pr-document
38-
39- - name : Document
40- run : |
41- setwd("R/bican.mccarroll.helloworld")
42- roxygen2::roxygenise()
43- shell : Rscript {0}
44-
45- - name : commit
46- run : |
47- git config --local user.name "$GITHUB_ACTOR"
48- git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
49- cd R/bican.mccarroll.helloworld
50- git add man/\* NAMESPACE
51- git commit -m 'Document'
52-
53- - uses : r-lib/actions/pr-push@v2
54- with :
55- repo-token : ${{ secrets.GITHUB_TOKEN }}
56-
57- style :
58- if : ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
59- name : style
60- runs-on : ubuntu-latest
61- env :
62- GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
63- permissions :
64- contents : write
65- steps :
66- - uses : actions/checkout@v4
67-
68- - uses : r-lib/actions/pr-fetch@v2
69- with :
70- repo-token : ${{ secrets.GITHUB_TOKEN }}
71-
72- - uses : r-lib/actions/setup-r@v2
73-
74- - name : Install dependencies
75- run : install.packages("styler")
76- shell : Rscript {0}
77-
78- - name : Style
79- run : styler::style_pkg()
80- shell : Rscript {0}
81-
82- - name : commit
83- run : |
84- git config --local user.name "$GITHUB_ACTOR"
85- git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
86- cd R/bican.mccarroll.helloworld
87- git add \*.R
88- git commit -m 'Style'
89-
90- - uses : r-lib/actions/pr-push@v2
91- with :
92- repo-token : ${{ secrets.GITHUB_TOKEN }}
14+ call-roxygen-reusable :
15+ uses : ./.github/workflows/roxygen-reusable.yml
16+ with :
17+ package_name : bican.mccarroll.helloworld
18+ secrets : inherit
0 commit comments