-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1015 Bytes
/
kubelinter.yml
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
name: Kubelinter on Dev Branch
on:
push:
branches:
- main
jobs:
kubelinter:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Kubelinter
run: |
curl -Lo kubelinter.tar.gz https://github.com/stackrox/kube-linter/releases/latest/download/kube-linter-linux.tar.gz
tar -xzf kubelinter.tar.gz
chmod +x kube-linter
sudo mv kube-linter /usr/local/bin/
- name: Lint YAML files in the repository
continue-on-error: true
run: kube-linter lint . > kube-linter-report.txt
- name: Upload report as an artifact
uses: actions/upload-artifact@v4
with:
name: kube-linter-report
path: kube-linter-report.txt
- name: Fail if the kube-linter report contains lines
run: |
if grep -q . kube-linter-report.txt; then
echo "kube-linter found issues in the repository"
exit 1
fi