-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (38 loc) · 1.02 KB
/
go-lint.yml
File metadata and controls
48 lines (38 loc) · 1.02 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Go Lint
on:
workflow_dispatch:
pull_request:
paths:
- '**.go'
push:
branches:
- main
paths:
- '**/*.go'
permissions:
contents: read
jobs:
lint:
name: Linting
runs-on: ["ubuntu-latest"]
container: ubuntu:24.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Install dependencies
run: |
apt-get update
apt-get install -y curl ca-certificates
update-ca-certificates
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v6.0.0
with:
go-version: '1.24'
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.64.2
echo "$PWD/bin" >> $GITHUB_PATH
- name: Run golangci-lint
run: golangci-lint run ./...