File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed
Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change 11# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
22# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
3- on : [push, pull_request]
3+
4+ # Details on pull_request_target and why it's insecure:
5+ # https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
6+ # Post describing a workaround, from which we take inspiration:
7+ # https://michaelheap.com/access-secrets-from-forks/
48
59name : R-CMD-check
610
11+ on :
12+ push :
13+ branches :
14+ - master
15+ - ' feature/**'
16+ - ' bugfix/**'
17+ pull_request_target :
18+ types : [opened, synchronize]
19+
720jobs :
21+ pre-check :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : Confirm crew102 triggered the build
25+ run : |
26+ if [ "${{ github.actor }}" == "crew102" ]; then
27+ echo "Actor is crew102"
28+ else
29+ echo "Actor is ${{ github.actor }}, failing build."
30+ exit 1
31+ fi
32+
833 R-CMD-check :
34+ needs : [pre-check]
935 runs-on : ${{ matrix.config.os }}
1036
1137 name : ${{ matrix.config.os }} (${{ matrix.config.r }})
2955 PATENTSVIEW_API_KEY : ${{ secrets.PATENTSVIEW_API_KEY }}
3056
3157 steps :
32- - uses : actions/checkout@v2
58+ - name : Checkout code
59+ uses : actions/checkout@v3
60+ with :
61+ # Use the head SHA for pull requests
62+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
3363
3464 - uses : r-lib/actions/setup-r@v1
3565 with :
You can’t perform that action at this time.
0 commit comments