-
Notifications
You must be signed in to change notification settings - Fork 111
70 lines (58 loc) · 2.41 KB
/
Copy pathlint.yml
File metadata and controls
70 lines (58 loc) · 2.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
64
65
66
67
68
69
70
name: Lint
on:
push:
branches: [main]
pull_request:
jobs:
helm:
runs-on: ubuntu-latest
name: Helm Validation ${{ matrix.helm }}
strategy:
matrix:
helm:
- v3.19.2 # renovate: datasource=github-releases depName=helm/helm versioning=same-major
- v4.0.0 # renovate: datasource=github-releases depName=helm/helm versioning=same-major
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: 3.x
- uses: yokawasa/action-setup-kube-tools@b16d49b2c459d33cf9d4c300a220ef0bcdbc730a # v0.14.0
with:
setup-tools: |
helm
helm: ${{ matrix.helm }}
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: none || true # Install pre-commit without running any hooks
# Run with pre-commit to get diff check
- name: helm-validation
run: |
pre-commit run helm-lint --all
pre-commit run helm-snapshots --all
pre-commit run deploy-manifests --all
pre-commit:
runs-on: ubuntu-latest
env:
# Helm lints are executed in a separate action with a version matrix
SKIP: "helm-lint,helm-snapshots,deploy-manifests"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: 3.x
- uses: yokawasa/action-setup-kube-tools@b16d49b2c459d33cf9d4c300a220ef0bcdbc730a # v0.14.0
with:
# helm is needed to generate chart snapshots
setup-tools: |
helm
helm: v4.2.3 # renovate: datasource=github-releases depName=helm/helm
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ~/.cache/golangci-lint
key: pre-commit-golangci-lint|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}|${{ hashFiles('**/*.go') }}
restore-keys: |
pre-commit-golangci-lint|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}|
pre-commit-golangci-lint|${{ env.pythonLocation }}|
pre-commit-golangci-lint|
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1