Skip to content

Commit

Permalink
Make sure we are building/testing with latest Go patch release
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
chadlwilson committed Apr 8, 2024
1 parent b206f00 commit 4116726
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'gauge/go.mod'
cache-dependency-path: 'gauge/go.sum'
id: go

- name: Setup java
uses: actions/setup-java@v4
Expand Down
65 changes: 33 additions & 32 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,36 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

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

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

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

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

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

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

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

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
1 change: 1 addition & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'
id: go

- name: Compile gauge
run: go run build/make.go --all-platforms --skip-windows
Expand All @@ -39,8 +39,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'
id: go

- name: Prep installer generation
shell: powershell
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'
id: go

- name: Test
run: go run build/make.go --test --verbose

Expand All @@ -40,9 +39,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'
id: go

- name: Set up Nodejs
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -108,9 +106,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'
id: go

- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -208,9 +205,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'go.mod'
id: go

- name: Build distro for ${{ matrix.os }}
run: go run build/make.go && go run build/make.go --distro

Expand Down Expand Up @@ -239,10 +235,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: 'gauge/go.mod'
cache-dependency-path: 'gauge/go.sum'
id: go

- name: Setup java
uses: actions/setup-java@v4
with:
Expand Down

0 comments on commit 4116726

Please sign in to comment.