Enclose Go Version in Workflow File There is a bug that github workflow will parse go version 1.20 as go version 1.2 unless we enclose the version num as string. See details here: https://github.com/onsi/ginkgo/issues/1169#issuecomment-1483839892 This issue is blocking our presubmit and we cannot merge the dep update CLs anymore. This patch fix the issue.
diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 1b96688..0ed5229 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml
@@ -12,9 +12,15 @@ name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # Must be a string, see https://github.com/onsi/ginkgo/issues/1169#issuecomment-1483839892 + - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: latest
diff --git a/go.mod b/go.mod index 20112ae..6d323c1 100644 --- a/go.mod +++ b/go.mod
@@ -1,5 +1,7 @@ module github.com/bazelbuild/remote-apis-sdks +// When you update the go version here, you have to also update the +// go version in the .github/workflows/golangci-lint.yml file. go 1.20 require (