| name: 'golang-govulncheck-action' |
| description: 'Run govulncheck' |
| inputs: |
| go-version-input: # version of Go to use for govulncheck |
| description: 'Version of Go to use for govulncheck' |
| required: false |
| default: '>=1.19.0' |
| go-package: |
| description: 'Go Package to scan with govulncheck' |
| required: false |
| default: './...' |
| runs: |
| using: "composite" |
| steps: |
| - uses: actions/checkout@v3 |
| - uses: actions/setup-go@v4.0.0 |
| with: |
| go-version: ${{ inputs.go-version-input }} |
| - name: Install govulncheck |
| run: go install golang.org/x/vuln/cmd/govulncheck@latest |
| shell: bash |
| - name: Run govulncheck |
| run: govulncheck ${{ inputs.go-package }} |
| shell: bash |