From b7a0e8c40a2471af6c1407bbc8fdb529f9f9890f Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 23 Sep 2024 09:51:49 +0100 Subject: [PATCH] test a workflow linter --- .gitea/workflows/kubernetes-linter.yml | 27 ++++++++++++++++++++++++++ .kube-linter-config.yml | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 .gitea/workflows/kubernetes-linter.yml create mode 100644 .kube-linter-config.yml diff --git a/.gitea/workflows/kubernetes-linter.yml b/.gitea/workflows/kubernetes-linter.yml new file mode 100644 index 0000000..26b4209 --- /dev/null +++ b/.gitea/workflows/kubernetes-linter.yml @@ -0,0 +1,27 @@ +name: Check Kubernetes YAMLs + +on: + push: + branches: [main, master] + pull_request: + +jobs: + scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Scan yaml files with kube-linter + uses: stackrox/kube-linter-action@v1.0.5 + id: kube-linter-action-scan + with: + directory: apps + config: .kube-linter-config.yaml + format: plain + continue-on-error: true + + - 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" ]] diff --git a/.kube-linter-config.yml b/.kube-linter-config.yml new file mode 100644 index 0000000..297060c --- /dev/null +++ b/.kube-linter-config.yml @@ -0,0 +1,3 @@ +checks: + include: [] + exclude: []