Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions .github/workflows/govulncheck-action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Test 'govulncheck-action'
name: govulncheck-action
on:
push:
branches:
Expand All @@ -7,6 +7,7 @@ on:
- '*.*'
paths:
- 'govulncheck-action/**'
- '.github/workflows/govulncheck-action.yml'
pull_request:
branches:
- master
Expand All @@ -15,11 +16,8 @@ on:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
name: Test
runs-on: ubuntu-latest
name: Test govulncheck-action

steps:
- name: Checkout code
Expand All @@ -37,17 +35,25 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles ('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-


- name: Test
working-directory: govulncheck-action
run: |
make test

lint:
runs-on: ubuntu-latest
name: Lint govulncheck-action

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Lint
uses: golangci/golangci-lint-action@v8
with:
Comment on lines +44 to 54
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the linter run fine without having go installed? Just asking because this is what we do in other repos - we install go and then run the linter - eg: https://github.com/codeready-toolchain/sandboxctl/blob/5569f6cb18cf34bdff47fefcd236ca5cbcd73662/.github/workflows/test.yaml#L44-L63

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does, if we refer to this build job

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I guess we could skip the installation of Go in other places, indeed

working-directory: govulncheck-action
version: v2.1.6
skip-pkg-cache: true
skip-build-cache: true
args: --config=.golangci.yml --verbose .

- name: Test
working-directory: govulncheck-action
run: |
make test
args: --config=.golangci.yml --verbose .
14 changes: 7 additions & 7 deletions govulncheck-action/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ ignored-vulnerabilities:
As an example:
```
ignored-vulnerabilities:
# Kubernetes kube-apiserver Vulnerable to Race Condition in k8s.io/kubernetes
# More info: https://pkg.go.dev/vuln/GO-2025-3547
# Module: k8s.io/kubernetes
# Fixed in: N/A
- id: GO-2025-3547
silence-until: 2020-05-10
info: https://pkg.go.dev/vuln/GO-2025-3547
# Kubernetes kube-apiserver Vulnerable to Race Condition in k8s.io/kubernetes
# More info: https://pkg.go.dev/vuln/GO-2025-3547
# Module: k8s.io/kubernetes
# Fixed in: N/A
- id: GO-2025-3547
silence-until: 2020-05-10
info: https://pkg.go.dev/vuln/GO-2025-3547
```

## Best practices
Expand Down
Loading