Skip to content

Commit fbacaeb

Browse files
committed
fix(docker-build): refine conditions for Hadolint comment creation
1 parent b22ff4f commit fbacaeb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/docker-build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ jobs:
121121
${{ steps.trivy.outputs.report }}
122122
```
123123
</details>
124-
});
125124
126125
- name: Upload Trivy scan results to GitHub Security tab
127126
if: github.event_name == 'pull_request' && inputs.security-scan && inputs.security-report == 'sarif'
@@ -148,7 +147,7 @@ jobs:
148147
body-includes: 'Hadolint Dockerfile Lint Results'
149148

150149
- name: Create or update Hadolint comment
151-
if: github.event_name == 'pull_request' && inputs.hadolint
150+
if: github.event_name == 'pull_request' && inputs.hadolint && steps.hadolint.outputs.report != ''
152151
uses: peter-evans/create-or-update-comment@v4
153152
with:
154153
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)