Skip to content

Conversation

@TartanLeGrand
Copy link
Contributor

This pull request refactors the .github/workflows/docker-build.yml file to improve the handling of Trivy and Hadolint results. It replaces custom scripts with reusable GitHub Actions for finding and updating comments on pull requests, enhancing maintainability and readability.

Trivy Security Scan Updates:

  • Replaced custom script for updating pull requests with Trivy results by integrating peter-evans/find-comment@v3 and peter-evans/create-or-update-comment@v4 actions. These actions find existing comments and update them with Trivy scan results in a structured format.

Hadolint Dockerfile Linter Updates:

  • Reintroduced the Hadolint linter step (hadolint/hadolint-action@v3.1.0) and added logic to find and update pull request comments using peter-evans/find-comment@v3 and peter-evans/create-or-update-comment@v4, replacing the previous custom script.

Other Enhancements:

  • Added an id to the Trivy step for better integration with subsequent actions.

@TartanLeGrand TartanLeGrand merged commit 298ec52 into main Apr 29, 2025
1 check passed
@TartanLeGrand TartanLeGrand deleted the feat/docker-build/enhance-reporting branch April 29, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant