Merge pull request #575 from fxamacker/dependabot/github_actions/gith… #473
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Actions workflow for govulncheck. | |
# This file is licensed under MIT License. | |
# https://github.com/fxamacker/cbor | |
name: govulncheck | |
# Revoke default permissions and grant what's needed in each job. | |
permissions: {} | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '**' | |
- '!**.md' | |
push: | |
paths: | |
- '**' | |
- '!**.md' | |
branches: | |
- 'main' | |
- 'master' | |
- 'release*' | |
- 'feature/stream-mode' | |
tags: | |
- 'v*' | |
jobs: | |
Check: | |
runs-on: ubuntu-latest | |
permissions: | |
# Grant permission to read content. | |
contents: read | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 1 | |
- name: Set up Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: 1.21.x | |
check-latest: true | |
- name: Install latest from golang.org | |
run: go install golang.org/x/vuln/cmd/govulncheck@4ea4418106cea3bb2c9aa098527c924e9e1fbbb4 # v1.1.3 | |
- name: Run govulncheck | |
run: govulncheck -show=traces ./... |