Skip to content

Commit

Permalink
ci: pin Go version (#210)
Browse files Browse the repository at this point in the history
* ci: pin Go version

Signed-off-by: Nikita Pivkin <[email protected]>

* disable Go cache for windows

Signed-off-by: Nikita Pivkin <[email protected]>

---------

Signed-off-by: Nikita Pivkin <[email protected]>
  • Loading branch information
nikpivkin authored Nov 19, 2024
1 parent d657ea4 commit 0d3a1fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ permissions:
contents: read
pull-requests: read

env:
GO_VERSION: '1.22'

jobs:
golangci:
name: lint
Expand All @@ -22,9 +25,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
go-version: ${{ env.GO_VERSION }}

- uses: golangci/golangci-lint-action@v5
with:
version: v1.54
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ on:
tags:
- "v*"

env:
GO_VERSION: '1.22'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.22
uses: actions/setup-go@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: ${{ env.GO_VERSION }}

- name: Build
run: make build
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
schedule:
- cron: 0 23 * * *

env:
GO_VERSION: '1.22'

jobs:
build:
name: building defsec
Expand All @@ -20,14 +23,12 @@ jobs:
- uses: actions/setup-go@v5
if: matrix.os != 'windows-latest'
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum

go-version: ${{ env.GO_VERSION }}

- uses: actions/setup-go@v5
if: matrix.os == 'windows-latest'
with:
go-version-file: go.mod
go-version: ${{ env.GO_VERSION }}
cache: false

- name: go mod tidy
Expand Down

0 comments on commit 0d3a1fb

Please sign in to comment.