Skip to content

Commit 8d4cc5c

Browse files
Feat: Support Multiple Images Scans to be Reported for Single PR
Previously the marocchino/sticky-pull-request-comment@v2 pull request header field was populated with a fixed value, so multiple image scans would all update the same PR comment and overwrite each other. This updates the header id to match the artifact name, allowing each for each image scan to update a separate PR comment.
2 parents c246554 + 0a32688 commit 8d4cc5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

image-scan/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ runs:
5555
- name: Trivy image scan
5656
uses: aquasecurity/trivy-action@0.28.0
5757
with:
58+
scan-type: 'image'
5859
image-ref: ${{ inputs.image-ref }}
5960
format: json
6061
output: trivy-image-scan.json
@@ -130,7 +131,7 @@ runs:
130131
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
131132
uses: marocchino/sticky-pull-request-comment@v2
132133
with:
133-
header: trivy-image-scan
134+
header: ${{ inputs.artifact-name }}
134135
path: trivy_image_report.md
135136

136137
- name: Check Trivy Issue Thresholds

0 commit comments

Comments
 (0)