Skip to content

Commit 689196b

Browse files
committed
Make sure we are building/testing with latest Go patch release
This is better for security and determinism as otherwise the action uses whatever happens to be cached, which might be old. Signed-off-by: Chad Wilson <[email protected]>
1 parent 6f7f3fb commit 689196b

File tree

3 files changed

+35
-31
lines changed

3 files changed

+35
-31
lines changed

.github/workflows/codeql-analysis.yml

+31-30
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,41 @@ jobs:
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v4
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
4242

43-
- name: Set up Go
44-
uses: actions/setup-go@v5
45-
if: matrix.language == 'go'
46-
with:
47-
go-version-file: 'go.mod'
43+
- name: Set up Go
44+
uses: actions/setup-go@v5
45+
if: matrix.language == 'go'
46+
with:
47+
check-latest: true
48+
go-version-file: 'go.mod'
4849

49-
# Initializes the CodeQL tools for scanning.
50-
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v3
52-
with:
53-
languages: ${{ matrix.language }}
54-
# If you wish to specify custom queries, you can do so here or in a config file.
55-
# By default, queries listed here will override any specified in a config file.
56-
# Prefix the list here with "+" to use these queries and those in the config file.
57-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
50+
# Initializes the CodeQL tools for scanning.
51+
- name: Initialize CodeQL
52+
uses: github/codeql-action/init@v3
53+
with:
54+
languages: ${{ matrix.language }}
55+
# If you wish to specify custom queries, you can do so here or in a config file.
56+
# By default, queries listed here will override any specified in a config file.
57+
# Prefix the list here with "+" to use these queries and those in the config file.
58+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5859

59-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
60-
# If this step fails, then you should remove it and run the build manually (see below)
61-
- name: Autobuild
62-
uses: github/codeql-action/autobuild@v3
60+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
61+
# If this step fails, then you should remove it and run the build manually (see below)
62+
- name: Autobuild
63+
uses: github/codeql-action/autobuild@v3
6364

64-
# ℹ️ Command-line programs to run using the OS shell.
65-
# 📚 https://git.io/JvXDl
65+
# ℹ️ Command-line programs to run using the OS shell.
66+
# 📚 https://git.io/JvXDl
6667

67-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
68-
# and modify them (or add more) to build your code if your project
69-
# uses a compiled language
68+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
69+
# and modify them (or add more) to build your code if your project
70+
# uses a compiled language
7071

71-
#- run: |
72-
# make bootstrap
73-
# make release
72+
#- run: |
73+
# make bootstrap
74+
# make release
7475

75-
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@v3
76+
- name: Perform CodeQL Analysis
77+
uses: github/codeql-action/analyze@v3

.github/workflows/release_on_pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
- name: Set up Go
3939
uses: actions/setup-go@v5
4040
with:
41+
check-latest: true
4142
go-version-file: 'go.mod'
42-
id: go
4343

4444
- name: Build artifacts
4545
run: go run build/make.go --all-platforms && go run build/make.go --all-platforms --distro

.github/workflows/tests.yml

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
- name: Set up Go
4545
uses: actions/setup-go@v5
4646
with:
47+
check-latest: true
4748
go-version-file: 'go.mod'
4849

4950
- name: Setup java
@@ -100,6 +101,7 @@ jobs:
100101
- name: Set up Go
101102
uses: actions/setup-go@v5
102103
with:
104+
check-latest: true
103105
go-version-file: 'go.mod'
104106

105107
- name: Setup java
@@ -151,6 +153,7 @@ jobs:
151153
- name: Set up Go
152154
uses: actions/setup-go@v5
153155
with:
156+
check-latest: true
154157
go-version-file: 'go.mod'
155158

156159
- name: Build distro for ${{ matrix.os }}

0 commit comments

Comments
 (0)