Skip to content

Commit

Permalink
Use pull_request_target with ownership check (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
whscullin authored Jan 6, 2025
1 parent 7204711 commit e353f9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test

on:
pull_request:
pull_request_target:
push:
branches:
- main
Expand All @@ -11,6 +11,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check access
if: ${{ github.event.pull_request.author_association != 'COLLABORATOR' && github.event.pull_request.author_association != 'OWNER' }}
run: |
echo "Event not triggered by a collaborator."
exit 1
- uses: actions/checkout@v4
with:
submodules: 'true'
Expand Down

0 comments on commit e353f9e

Please sign in to comment.