-
Notifications
You must be signed in to change notification settings - Fork 14
74 lines (68 loc) · 2 KB
/
linting.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
63
64
65
66
67
68
69
70
71
72
73
74
name: Linting
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
paths-ignore:
- README.md
- docs/*.md
pull_request:
branches:
- "main"
paths-ignore:
- README.md
- docs/*.md
jobs:
lint-yaml:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Validate YAML
uses: ibiqlik/action-yamllint@v3
lint-bash:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
version: v0.8.0
severity: warning
lint-container:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Run hadolint
uses: hadolint/[email protected]
with:
dockerfile: Containerfile
recursive: true
- name: Run hadolint
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
recursive: true
lint-manifests:
runs-on: ubuntu-latest
env:
# KUSTOMIZE_VERSION: v5.0.1
BIN_PATH: /usr/bin
steps:
- name: Install Kustomize
run: |
set -x
LATEST=$( curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest | jq .name | sed 's#kustomize/##; s#"##g')
BIN_VERSION=${KUSTOMIZE_VERSION:-${LATEST}}
DOWNLOAD_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${BIN_VERSION}/kustomize_${BIN_VERSION}_linux_amd64.tar.gz
curl "${DOWNLOAD_URL}" -sL | sudo tar zx -C "${BIN_PATH}/" kustomize
sudo chmod +x "${BIN_PATH}"/kustomize
- name: Code Checkout
uses: actions/checkout@v4
- name: Validate Manifests
run: |
[ -d ./bootstrap/base ] && touch bootstrap/base/sealed-secrets-secret.yaml
./scripts/validate_kustomize.sh
./scripts/validate_helm.sh