Skip to content

Commit

Permalink
chore: use golangci-lint github action instead if manual download (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
howieyuen committed Feb 14, 2023
1 parent a095d9d commit bdfbf04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,11 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Download golangci-lint
run: |
wget https://github.com/golangci/golangci-lint/releases/download/v1.50.1/golangci-lint-1.50.1-linux-amd64.tar.gz
tar -xvf ./golangci-lint-1.50.1-linux-amd64.tar.gz
- name: Running golangci-lint
env:
GO111MODULE: on
GOPATH: /home/runner/work/
run: GOLINTER=./golangci-lint-1.50.1-linux-amd64/golangci-lint make lint
- name: golangci-lint
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: v1.50.1
Publish: # Pack and publish image to Docker Hub and Github Release
runs-on: ubuntu-latest
needs: [Test, Lint]
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,8 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Download golangci-lint
run: |
wget https://github.com/golangci/golangci-lint/releases/download/v1.50.1/golangci-lint-1.50.1-linux-amd64.tar.gz
tar -xvf ./golangci-lint-1.50.1-linux-amd64.tar.gz
- name: Running golangci-lint
env:
GO111MODULE: on
GOPATH: /home/runner/work/
run: GOLINTER=./golangci-lint-1.50.1-linux-amd64/golangci-lint make lint
- name: golangci-lint
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: v1.50.1

0 comments on commit bdfbf04

Please sign in to comment.