Skip to content

Fix golangci-lint installation #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

GusAntoniassi
Copy link

Hello, I wasn't able to use this action because the golangci-lint tool apparently wasn't being in the PATH.

I have done some debugging, ran some ls -lah inside the job, and compared with the actions/setup-go installer, and found out the tool was being extracted in a golangci-lint-${version}-linux-amd64 directory.

I have added the following code to add the correct directory to PATH:

  // Tool will be extracted in a directory with the compressed file name
  toolRoot = path.join(toolPath, `golangci-lint-${version}-linux-amd64`)

  // Add golangci-lint dir to bin
  core.addPath(toolRoot);

I have also added some extra things like a which and a golangci-lint --version command to validate the tool instalation, and some usage documentation in the README.md.

Any feedback is much appreciated.

@GusAntoniassi
Copy link
Author

Fixes #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant