-
Notifications
You must be signed in to change notification settings - Fork 1.6k
43 lines (36 loc) · 1.11 KB
/
golint.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
35
36
37
38
39
40
41
42
43
name: Lint
on: [push,pull_request,workflow_dispatch]
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
skip-cache: true
- name: Tests
run: |
go test $(go list ./...)
- name: Commit back
if: ${{ github.repository_owner == 'Mrs4s' && !github.event.pull_request }}
continue-on-error: true
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add --all
git commit -m "ci(chore): Fix stylings"
git push
- name: Suggester
if: ${{ github.event.pull_request }}
uses: reviewdog/action-suggester@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tool_name: golangci-lint