-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.52 KB
/
lint.yaml
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
---
name: lint
on:
pull_request:
types: [opened, reopened, synchronize]
branches: [main]
env:
KUSTOMIZE_VERSION: v5.1.0
jobs:
lint-yaml:
runs-on: ubuntu-24.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node: [20]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Lint YAML
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: "./k8s"
config_file: "./.github/yamllint.config.yaml"
- name: Set up Kustomize
working-directory: k8s/staging
run: |-
curl -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${{env.KUSTOMIZE_VERSION}}/kustomize_${{env.KUSTOMIZE_VERSION}}_linux_amd64.tar.gz
tar xzf ./kustomize_${{env.KUSTOMIZE_VERSION}}_linux_amd64.tar.gz
chmod u+x ./kustomize
- name: Build the k8s manifests using Kustomize
working-directory: k8s/staging
run: |-
./kustomize build > staging-manifests.yaml
- name: Scan k8s manifests with kube-linter
uses: stackrox/[email protected]
with:
directory: "./k8s/staging/staging-manifests.yaml"
config: .github/kube-linter.yaml
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci
- name: Lint JS
env:
ESLINT_USE_FLAT_CONFIG: false
run: npm run lint