Skip to content

Commit 73c8a8e

Browse files
authored
Merge pull request #224 from arnested/fix-govulncheck-workflow
Be explicit about which version to use for govulncheck
2 parents 31a809e + f38500d commit 73c8a8e

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,24 @@ jobs:
3131
- run: git checkout HEAD^2
3232
if: ${{ github.event_name == 'pull_request' }}
3333

34-
# Initializes the CodeQL tools for scanning.
35-
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@v2
37-
with:
38-
languages: go
34+
- uses: arnested/go-version-action@v1
35+
id: go-version
3936

40-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
41-
# If this step fails, then you should remove it and run the build manually (see below)
42-
- name: Autobuild
43-
uses: github/codeql-action/autobuild@v2
37+
- name: Set up Go ${{ steps.go-version.outputs.latest }}
38+
uses: WillAbides/[email protected]
39+
with:
40+
go-version: ${{ steps.go-version.outputs.latest }}.x
41+
ignore-local: true
4442

45-
# ℹ️ Command-line programs to run using the OS shell.
46-
# 📚 https://git.io/JvXDl
43+
- run: go version
4744

48-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
49-
# and modify them (or add more) to build your code if your project
50-
# uses a compiled language
45+
- run: go build
5146

52-
#- run: |
53-
# make bootstrap
54-
# make release
47+
# Initializes the CodeQL tools for scanning.
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@v2
50+
with:
51+
languages: go
5552

5653
- name: Perform CodeQL Analysis
5754
uses: github/codeql-action/analyze@v2

.github/workflows/security.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ jobs:
3535
name: Govulncheck
3636
runs-on: ubuntu-22.04
3737
steps:
38+
- uses: actions/checkout@v4
39+
- uses: arnested/go-version-action@v1
40+
id: go-version
41+
with:
42+
patch-level: true
3843
- id: govulncheck
3944
uses: golang/govulncheck-action@master
4045
with:
41-
go-version-file: go.mod
46+
go-version-input: ${{ steps.go-version.outputs.latest }}
47+
repo-checkout: false

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/arnested/systemd-state
22

3-
go 1.21
3+
go 1.21.1
44

55
require (
66
github.com/coreos/go-systemd/v22 v22.5.0

0 commit comments

Comments
 (0)