-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (42 loc) · 1.12 KB
/
govulncheck.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: govulncheck
on:
workflow_call:
inputs:
go-version:
required: false
type: string
default: stable
cache:
required: false
type: boolean
default: true
run:
required: false
type: string
secrets:
gh_pat:
required: false
permissions:
contents: read
jobs:
scan:
runs-on: ubuntu-latest
env:
GH_PAT: ${{ secrets.gh_pat }}
RUN: ${{ inputs.run }}
steps:
- run: |
git config --global url."https://${{ secrets.gh_pat }}@github.com/charmbracelet".insteadOf "https://github.com/charmbracelet"
git config --global url."https://${{ secrets.gh_pat }}@github.com/charmcli".insteadOf "https://github.com/charmcli"
if: env.GH_PAT != null
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
cache: ${{ inputs.cache }}
- run: ${{ inputs.run }}
if: env.RUN != null
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...