Skip to content

Commit

Permalink
ci: pin Go version
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Pivkin <nikita.pivkin@smartforce.io>
  • Loading branch information
nikpivkin committed Aug 14, 2024
1 parent 36eac7e commit df65243
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 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
14 changes: 4 additions & 10 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 @@ -18,17 +21,8 @@ jobs:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
if: matrix.os != 'windows-latest'
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum

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

- name: go mod tidy
if: matrix.os == 'ubuntu-latest'
Expand Down

0 comments on commit df65243

Please sign in to comment.