forked from kubernetes-sigs/cluster-api
-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (31 loc) · 987 Bytes
/
golangci-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: golangci-lint
on:
pull_request:
types: [opened, edited, synchronize, reopened]
# Remove all permissions from GITHUB_TOKEN except metadata.
permissions: {}
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
working-directory:
- ""
- test
- hack/tools
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag=v3.5.0
- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # tag=v3.5.0
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # tag=v3.4.0
with:
version: v1.51.1
working-directory: ${{matrix.working-directory}}