Skip to content

Commit

Permalink
add pr-commands workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Jun 18, 2020
1 parent b15e541 commit 03a34d1
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
issue_comment:
types: [created]
name: Commands
jobs:
# added so that the workflow doesn't fail.
always_runner:
runs-on: ubuntu-latest
steps:
- name: Always run
run: echo "This job is used to prevent the workflow status from showing as failed when all other jobs are skipped"
document:
if: startsWith(github.event.comment.body, '/document')
name: document
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/pr-fetch@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: r-lib/actions/setup-r@master
- name: Install dependencies
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
- name: Document
run: Rscript -e 'roxygen2::roxygenise()'
- name: commit
run: |
git add man/\* NAMESPACE
git commit -m 'Document'
- uses: r-lib/actions/pr-push@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# style:
# if: startsWith(github.event.comment.body, '/style')
# name: style
# runs-on: macOS-latest
# env:
# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - uses: actions/checkout@v2
# - uses: r-lib/actions/pr-fetch@master
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - uses: r-lib/actions/setup-r@master
# - name: Install dependencies
# run: Rscript -e 'install.packages("styler")'
# - name: Style
# run: Rscript -e 'styler::style_pkg()'
# - name: commit
# run: |
# git add \*.R
# git commit -m 'Style'
# - uses: r-lib/actions/pr-push@master
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 03a34d1

Please sign in to comment.