This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
homelab/.gitea/workflows/kubernetes-linter.yml

41 lines
952 B
YAML
Raw Normal View History

2024-09-23 09:51:49 +01:00
name: Check Kubernetes YAMLs
on:
push:
branches: [main, master]
paths:
2024-09-24 06:51:22 +01:00
- "kubernetes/apps/production/**"
2024-09-23 09:51:49 +01:00
pull_request:
paths:
2024-09-24 06:51:22 +01:00
- "kubernetes/apps/production/**"
2024-09-23 09:51:49 +01:00
jobs:
scan:
runs-on: ubuntu-latest
steps:
2024-09-23 10:13:51 +01:00
- name: Checkout
uses: actions/checkout@v4
2024-09-23 09:51:49 +01:00
2024-09-23 09:53:49 +01:00
- name: Setup Go
uses: actions/setup-go@v5
2024-09-23 09:51:49 +01:00
with:
2024-09-23 09:54:29 +01:00
go-version: "1.23.1"
2024-09-23 09:53:49 +01:00
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
2024-09-23 09:53:49 +01:00
- name: Install kube-linter
run: |
go install golang.stackrox.io/kube-linter/cmd/kube-linter@latest
2024-09-23 09:51:49 +01:00
2024-09-23 09:53:49 +01:00
- name: Scan yaml files with kube-linter
2024-09-23 09:51:49 +01:00
run: |
2024-09-24 06:51:22 +01:00
kube-linter lint ./kubernetes/apps/production --config kubelinter-config.yaml