Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: solve error check k8s workflow main #102

Merged
merged 3 commits into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/kubeconform-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Kubeconform Validation

on:
pull_request:
push:
branches: main

jobs:
load-environments:
Expand Down Expand Up @@ -41,7 +43,22 @@ jobs:
with:
kubectl: latest
kustomize: latest
kubeconform: latest
kubeconform: v0.6.6
- name: Print versions
run: |
echo "Kubectl version installed:"
kubectl version --client
echo "Kustomize version installed:"
kustomize version
echo "Kubeconform version installed:"
kubeconform -v
- name: Extract Kubernetes client version
id: extract_version
run: |
KUBECTL_VERSION=$(kubectl version --client --output=json | jq -r '.clientVersion.gitVersion' | sed 's/^v//')
echo "Extracted KUBECTL_VERSION=${KUBECTL_VERSION}"
echo "k8s_version=${KUBECTL_VERSION}" >> $GITHUB_OUTPUT
- name: Check k8s manifests
run: |
kustomize build $TUTOR_ROOT/env | kubeconform -strict -ignore-missing-schemas -kubernetes-version latest
K8S_VERSION=${{ steps.extract_version.outputs.k8s_version }}
kustomize build $TUTOR_ROOT/env | kubeconform -strict -ignore-missing-schemas -kubernetes-version ${K8S_VERSION}
Loading