Add govulncheck to CI #3
Workflow file for this run
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
name: Govulncheck | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
- release-branch-* | ||
pull_request: | ||
branches: | ||
- '**' | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
jobs: | ||
govulncheck: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
# When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true | ||
fail-fast: false | ||
matrix: | ||
GO_VERSION: | ||
- "1.20.5" | ||
- "1.21rc2" | ||
steps: | ||
# Enable https://github.com/golang/go/wiki/LoopvarExperiment if we're on | ||
# go1.21rc2 or higher. This experiment value is unknown in lower versions. | ||
- if: startsWith(matrix.GO_VERSION, '1.21') | ||
run: echo "GOEXPERIMENT=loopvar" >> "$GITHUB_ENV" | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- id: Run govulncheck | ||
Check failure on line 39 in .github/workflows/govulncheck.yml GitHub Actions / GovulncheckInvalid workflow file
|
||
uses: golang/govulncheck-action@v0.1.0 | ||
with: | ||
go-version-input: ${{ matrix.GO_VERSION }} |