From 4333b4f08d613d881dc891170e23774df248c7ce Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Tue, 5 Apr 2022 13:52:41 -0500 Subject: [PATCH] fix: build/lint is broken due to dependencies changes (#1958) Signed-off-by: zachaller --- .github/workflows/go.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index bb382359d2..9d7ba50006 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,26 +7,34 @@ on: pull_request: branches: - "master" +env: + # Golang version to use across CI steps + GOLANG_VERSION: '1.17' + jobs: lint-go: name: Lint Go code runs-on: ubuntu-latest steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ${{ env.GOLANG_VERSION }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: - version: v1.30 + version: v1.45.2 args: --timeout 5m build: name: Build runs-on: ubuntu-latest steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: ${{ env.GOLANG_VERSION }} id: go - name: Check out code into the Go module directory @@ -70,7 +78,7 @@ jobs: - name: Setup Golang uses: actions/setup-go@v1 with: - go-version: 1.17.6 + go-version: ${{ env.GOLANG_VERSION }} # k8s codegen generates files into GOPATH location instead of the GitHub git checkout location # This symlink is necessary to ensure that `git diff` detects changes - name: Create symlink in GOPATH