-
-
Notifications
You must be signed in to change notification settings - Fork 46
23 lines (22 loc) · 943 Bytes
/
check-golangci-lint-config.yml
File metadata and controls
23 lines (22 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: check golangci-lint config
on:
pull_request:
push:
branches:
- master
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
golangci-lint-version: ["v1", "v2"]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install golangci-lint
run: |
tag_name="$(curl https://api.github.com/repos/golangci/golangci-lint/releases/latest | jq .tag_name)"
curl -sSfL "https://raw.githubusercontent.com/golangci/golangci-lint/refs/tags/$tag_name/install.sh" | sh -s -- -b "$(go env GOPATH)/bin" ${{ matrix.golangci-lint-version == 'v1' && 'v1.64.8' || 'latest' }}
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- name: Validate golangci-lint config
run: golangci-lint config verify --config=.github/.golangci.${{ matrix.golangci-lint-version }}.yml