Skip to content

Go version 1.20 specified in config file causes linting against Go 1.2. #669

@vaughany

Description

@vaughany

Welcome

  • Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).

Description of the problem

First time user of GolangCI-lint action.

In the .yml config file I wrote the following:

jobs: golangci: name: lint runs-on: ubuntu-latest steps: - uses: actions/setup-go@v3 with: go-version: 1.20 

...which caused the action to download Go 1.2, not 1.20:

Run actions/setup-go@v3 with: go-version: 1.[2](https://github.com/coachinabox/uptime-monitor/actions/runs/4116180025/jobs/7105883087#step:2:2) check-latest: false token: *** cache: false Setup go version spec 1.2 Attempting to download 1.2... matching 1.2... Not found in manifest. Falling back to download directly from Go Install from dist Acquiring go1.2.2 from https://storage.googleapis.com/golang/go1.2.2.linux-amd6[4](https://github.com/coachinabox/uptime-monitor/actions/runs/4116180025/jobs/7105883087#step:2:4).tar.gz Extracting Go... ... 

Changing go-version: 1.20 to go-version: 1.19 correctly uses Go 1.19.5.

Version of golangci-lint

latest (1.51.1 at the time of writing)

Version of the GitHub Action

3.4.0

Workflow file

name: golangci-lint on: push: tags: - v* branches: - main - protobuf pull_request: permissions: contents: read pull-requests: read jobs: golangci: name: lint runs-on: ubuntu-latest steps: - uses: actions/setup-go@v3 with: go-version: 1.20 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: version: latest # working-directory: somedir # args: --issues-exit-code=0 only-new-issues: true # skip-cache: true # skip-pkg-cache: true # skip-build-cache: true 

Go version

1.20

Code example or link to a public repository

// add your code here

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions