Skip to content

Commit

Permalink
github workflows: fix the lint job
Browse files Browse the repository at this point in the history
This metallb-operator v0.12 is using go v1.16, however, the lint lane
in the CI is installing the latest go.

This change fixes the version to v1.16 by first downloading go v1.16
using actions/setup-go@v2, and then calling golangci-lint with the
skip-go-installation: true.

This solution was recommended here: golangci/golangci-lint-action#75
  • Loading branch information
liornoy authored and fedepaol committed Apr 11, 2023
1 parent bd9bcd5 commit 3ff037a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
id: go

- name: Verify
uses: golangci/golangci-lint-action@v2
with:
version: v1.41.1
args: --timeout=15m0s --verbose
skip-go-installation: true

unit:
runs-on: ubuntu-20.04
Expand Down

0 comments on commit 3ff037a

Please sign in to comment.