mirror of
https://github.com/stackrox/kube-linter-action.git
synced 2026-07-15 12:51:41 +00:00
add support for fail-on-invalid-resource (#29)
This commit is contained in:
@@ -73,3 +73,28 @@ jobs:
|
||||
|
||||
- name: Upload SARIF output file to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
|
||||
test-fail-on-invalid-resource:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Scan 1 - should succeed
|
||||
uses: ./
|
||||
with:
|
||||
directory: sample/non-kubernetes-yaml
|
||||
config: sample/.kube-linter-config.yaml
|
||||
|
||||
- name: Scan 2 - should fail
|
||||
id: failing-scan
|
||||
uses: ./
|
||||
with:
|
||||
directory: sample/non-kubernetes-yaml
|
||||
config: sample/.kube-linter-config.yaml
|
||||
fail-on-invalid-resource: "true"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Verify Scan 2 should have failed
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Verifying that kube-linter-action outcome (${{ steps.failing-scan.outcome }}) from Scan 2 is failure."
|
||||
[[ "${{ steps.failing-scan.outcome }}" == "failure" ]]
|
||||
|
||||
Reference in New Issue
Block a user