Skip to content

Commit ca9c27f

Browse files
committed
feat(build-go-docker): switch to golangci-lint for linting
1 parent 7443838 commit ca9c27f

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

.github/workflows/build-go-docker.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ on:
5656
required: false
5757
type: string
5858

59+
golangci_lint_version:
60+
description: Version of golangci-lint to use
61+
default: 1.52.2
62+
required: false
63+
type: string
64+
5965
develop_branch_name:
6066
description: Name of the branch with the `develop` role. Can be left empty if thre is no such branch
6167
default: ""
@@ -107,12 +113,6 @@ on:
107113
required: false
108114
type: string
109115

110-
build_tags:
111-
description: Extra build args (used for staticcheck)
112-
default: ""
113-
required: false
114-
type: string
115-
116116
secrets:
117117
docker_password:
118118
description: Target Docker password
@@ -160,18 +160,13 @@ jobs:
160160
version: 3.x
161161
repo-token: ${{ secrets.GITHUB_TOKEN }}
162162

163-
- name: Run go vet
164-
run: task vet
165-
166-
- name: Run gofmt
167-
run: task gofmt
163+
- name: Prepare linting
164+
run: task pre-lint
168165

169-
- name: Run staticcheck
170-
uses: dominikh/staticcheck-action@v1.3.0
166+
- name: Run golangci-lint
167+
uses: golangci/golangci-lint-action@v3
171168
with:
172-
version: 2023.1.3
173-
install-go: false
174-
build-tags: ${{ inputs.build_tags }}
169+
version: v${{ inputs.golangci_lint_version }}
175170

176171
- name: Run hadolint
177172
run: |

0 commit comments

Comments
 (0)