-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (57 loc) · 1.41 KB
/
go-lint.yml
File metadata and controls
63 lines (57 loc) · 1.41 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
env:
# renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCI_LINT_VERSION: v2.8.0
jobs:
skip-check:
name: Skip check
continue-on-error: true
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
should_skip: ${{ steps.skip-check.outputs.should_skip }}
permissions:
actions: write
contents: read
steps:
- id: skip-check
uses: fkirc/skip-duplicate-actions@v5
with:
do_not_skip: '["push", "schedule", "workflow_dispatch"]'
paths: |-
[
"**.go",
".github/workflows/go-lint.yml"
]
skip_after_successful_duplicate: false
lint:
name: Go Lint
needs: skip-check
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}