-
Notifications
You must be signed in to change notification settings - Fork 2.1k
108 lines (89 loc) · 2.92 KB
/
Copy pathlint-format.yml
File metadata and controls
108 lines (89 loc) · 2.92 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Lint & Formatting
on:
pull_request:
branches:
- main
merge_group:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.ref_name }}-lint-format
cancel-in-progress: true
permissions:
contents: read
jobs:
format:
name: Format
if: github.repository == 'nginx/kubernetes-ingress'
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Golang Environment
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- name: Run goimports & gofumpt
run: |
make format
git diff --exit-code
lint:
name: Lint
if: github.repository == 'nginx/kubernetes-ingress'
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: read # for golangci-lint-action
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # Fetch full history for accurate linting of new issues
- name: Setup Golang Environment
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- name: Generate secrets for linting
run: |
make secrets
- name: Lint Code
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.12.2
only-new-issues: true
actionlint:
name: Actionlint
if: github.repository == 'nginx/kubernetes-ingress'
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: reviewdog/action-actionlint@d63ba7532e0942965320cd8d73cbae4c7b3c5283 # v1.73.1
with:
actionlint_flags: -shellcheck ""
chart-lint:
name: Chart Lint
if: github.repository == 'nginx/kubernetes-ingress'
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: v3.21.3 # renovate: datasource=github-releases depName=helm/helm
- name: Lint chart
run: helm lint charts/nginx-ingress
markdown-lint:
name: Markdown Lint
if: github.repository == 'nginx/kubernetes-ingress'
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: DavidAnson/markdownlint-cli2-action@21c1be1b93ad9ed58fa840aacc3f279cde2a72ff # v24.2.0
with:
config: .markdownlint-cli2.yaml
globs: "**/*.md"
fix: false