-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.12 KB
/
lint.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
---
name: Lint yaml
on: push
jobs:
run-kube-linter:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# This prepares directory where github/codeql-action/upload-sarif@v1 looks up report files by default.
- name: Create ../results directory for SARIF report files
shell: bash
run: mkdir -p ../results
- name: Scan repo with kube-linter
uses: stackrox/[email protected]
with:
directory: .
format: sarif
output-file: ../results/kube-linter.sarif
continue-on-error: true
- name: Upload SARIF report files to GitHub
uses: github/codeql-action/upload-sarif@v3
# When we are ready to fail builds. Enable the following
# # Ensure the workflow eventually fails if files did not pass kube-linter checks.
# - name: Verify kube-linter-action succeeded
# shell: bash
# run: |
# echo "If this step fails, kube-linter found issues. Check the output of the scan step above."
# [[ "${{ steps.kube-linter-action-scan.outcome }}" == "success" ]]