Skip to content

Commit

Permalink
feat: automatically comment on PR for govulncheck
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Drees <[email protected]>
  • Loading branch information
MDr164 committed Mar 8, 2024
1 parent 254decf commit 36f6adf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
name: Linting
jobs:
govulncheck_job:
permissions:
pull-requests: write # Needed to allow writing comments on PRs
runs-on: ubuntu-latest
name: govulncheck
steps:
Expand All @@ -28,6 +30,14 @@ jobs:
with:
go-version-file: 'go.mod'
go-package: ./...
- name: Comment on PR
if: steps.govulncheck.outcome == 'failure'
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
with:
message: |
:warning: **govulncheck found potential vulnerabilities in the code**
Check the output here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ github.job }}
comment_tag: govuln

golangci:
name: golangci-lint
Expand Down

0 comments on commit 36f6adf

Please sign in to comment.