Skip to content

Commit 73907db

Browse files
authored
fix(trivy-scan): don't comment if PR from fork (#10490)
1 parent 041f95b commit 73907db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/actions/trivy-scan/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ runs:
117117
INPUTS_IMAGE_TAG: ${{ inputs.image-tag }}
118118

119119
- name: Comment scan results on PR
120-
if: inputs.create-pr-comment == 'true' && github.event_name == 'pull_request'
120+
if: >-
121+
inputs.create-pr-comment == 'true'
122+
&& github.event_name == 'pull_request'
123+
&& github.event.pull_request.head.repo.full_name == github.repository
121124
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
122125
env:
123126
IMAGE_NAME: ${{ inputs.image-name }}

0 commit comments

Comments
 (0)