-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (28 loc) · 1.08 KB
/
kubeconform.yaml
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
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Kubeconform"
on:
pull_request:
branches: ["main"]
env:
KUBERNETES_DIR: ./
jobs:
kubeconform:
name: Kubeconform
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Setup Workflow Tools
run: brew install fluxcd/tap/flux kubeconform kustomize
- name: Setup policy generator
run: |
mkdir -p ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator
wget https://github.com/open-cluster-management-io/policy-generator-plugin/releases/download/v1.15.0/linux-amd64-PolicyGenerator
chmod +x linux-amd64-PolicyGenerator
mv linux-amd64-PolicyGenerator ${HOME}/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator
- name: Run kubeconform
shell: bash
run: bash ./scripts/kubeconform.sh ${{ env.KUBERNETES_DIR }}