@@ -156,7 +156,15 @@ jobs:
156156 runs-on : ubuntu-latest
157157
158158 steps :
159- - uses : actions/checkout@v2
159+ - name : Checkout
160+ if : ${{ github.event_name != 'pull_request_target' }}
161+ uses : actions/checkout@v2
162+
163+ - name : Checkout PR
164+ if : ${{ github.event_name == 'pull_request_target' }}
165+ uses : actions/checkout@v2
166+ with :
167+ ref : ${{ github.event.pull_request.head.sha }}
160168 - uses : pnpm/action-setup@v2.2.2
161169 with :
162170 version : 7
@@ -230,7 +238,15 @@ jobs:
230238 runs-on : ubuntu-latest
231239
232240 steps :
233- - uses : actions/checkout@v2
241+ - name : Checkout
242+ if : ${{ github.event_name != 'pull_request_target' }}
243+ uses : actions/checkout@v2
244+
245+ - name : Checkout PR
246+ if : ${{ github.event_name == 'pull_request_target' }}
247+ uses : actions/checkout@v2
248+ with :
249+ ref : ${{ github.event.pull_request.head.sha }}
234250 - uses : pnpm/action-setup@v2.2.2
235251 with :
236252 version : 7
@@ -277,7 +293,15 @@ jobs:
277293 runs-on : ubuntu-latest
278294
279295 steps :
280- - uses : actions/checkout@v2
296+ - name : Checkout
297+ if : ${{ github.event_name != 'pull_request_target' }}
298+ uses : actions/checkout@v2
299+
300+ - name : Checkout PR
301+ if : ${{ github.event_name == 'pull_request_target' }}
302+ uses : actions/checkout@v2
303+ with :
304+ ref : ${{ github.event.pull_request.head.sha }}
281305 - uses : pnpm/action-setup@v2.2.2
282306 with :
283307 version : 7
0 commit comments