Skip to content
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

Make download URL for golangci-lint configurable #201

Closed
sspaink opened this issue Apr 2, 2021 · 1 comment · Fixed by #768
Closed

Make download URL for golangci-lint configurable #201

sspaink opened this issue Apr 2, 2021 · 1 comment · Fixed by #768

Comments

@sspaink
Copy link

sspaink commented Apr 2, 2021

I am interested in using this Github Action along with a private linter but this isn't possible at the moment because the release builds use CGO_ENABLED=0, while CGO_ENABLED=1 is required to use plugins (related issue: golangci/golangci-lint#1276)

The best solution I can come up with is to make the download URL configurable, where if a custom URL is set that is what the function getAssestURL returns. This would let users build and deploy a version of golangci-lint with CGO_ENABLED=1 and host it somewhere, and still use this github action.

I'd be happy to make a pr to address this, but would like feedback to make sure this is the correct approach? because from the issue linked above it seems this is currently a blocker to use private linters.

@thebeline
Copy link
Contributor

thebeline commented Apr 2, 2021

Not sure if this addresses your issue or not (as I don't fully understand it), but if you are looking to set go env variables (again, I may be off) or what have you, the following may offer some guidance:

jobs:
  golangci:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Git Checkout
        uses: actions/checkout@v2
      - name: GolangCI INIT
        uses: golangci/golangci-lint-action@master
        with:
          version: v1.39.0
          # the following causes golangci-init to do nothing, so all it does is install golang
          args: --version
      - name: Configure Golang ENV
        run: go env -w GOFLAGS=-tags=gtk_3_22,glib_2_58,pango_1_42,gdk_pixbuf_2_38
        # or do whatever
      - name: GolangCI Lint
        uses: golangci/golangci-lint-action@master
        with:
          version: v1.39.0
          skip-go-installation: true

EDIT: Nope, I stand corrected. You actually want to compile golangci-lint. Huh... Well then... Ignore me.

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 a pull request may close this issue.

2 participants