Skip to content

Commit 6504003

Browse files
committed
Checkout correct commit when used with pull_request_target
1 parent 9d60d28 commit 6504003

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/comment-on-asciidoc-changes.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414
steps:
1515
- name: Checkout the repository
1616
uses: actions/checkout@v4
17+
with:
18+
# This is considered a security risk when used in conjunction with pull_request_target
19+
# However, we are not running any code from the PR, so it's safe
20+
ref: ${{ github.event.pull_request.head.sha }}
1721

1822
- name: Get changed files
1923
id: check-files

0 commit comments

Comments
 (0)