@@ -49,9 +49,7 @@ inputs:
49
49
outputs :
50
50
image-name :
51
51
description : Name of the scanned Docker image.
52
- image-tag :
53
- description : Tag of the scanned Docker image.
54
- scan-results :
52
+ scan-results-path :
55
53
description : Path to the scan results file (e.g., results.stdout).
56
54
57
55
runs :
@@ -104,7 +102,7 @@ runs:
104
102
run : |
105
103
if [ -f results.stdout ]; then
106
104
echo "Scan results file (results.stdout) exists."
107
- echo "::set-output name=scan-results::results.stdout"
105
+ echo "::set-output name=scan-results-path ::results.stdout"
108
106
else
109
107
echo "Scan results file (results.stdout) does not exist."
110
108
exit 1
@@ -122,6 +120,31 @@ runs:
122
120
echo "</details>" >> pr-results.md
123
121
shell : bash
124
122
123
+ - name : Check for Previous Report Comment
124
+ id : fc
125
+ if : github.event_name == 'pull_request' && github.event.pull_request.number != ''
126
+ uses : peter-evans/find-comment@v3
127
+ with :
128
+ issue-number : ${{ github.event.pull_request.number }}
129
+ comment-author : " github-actions[bot]"
130
+ body-includes : " Lacework Inline Scanner Results"
131
+
132
+ - name : Delete Previous Test Report Comment
133
+ if : github.event_name == 'pull_request' && steps.fc.outputs.comment-id != ''
134
+ uses : winterjung/comment@v1
135
+ with :
136
+ type : delete
137
+ comment_id : ${{ steps.fc.outputs.comment-id }}
138
+ token : ${{ inputs.github-token }}
139
+
140
+ - name : Comment PR
141
+ if : github.event_name == 'pull_request'
142
+ uses : thollander/actions-comment-pull-request@v3
143
+ with :
144
+ filePath : pr-results.md
145
+ mode : recreate
146
+ comment_tag : to_recreate
147
+
125
148
- name : Cleanup Docker Image
126
149
if : always()
127
150
run : |
0 commit comments