ci(kubernetes-ci): use kubectl-validate
instead of Azure/k8s-lint
#62
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI - Kubernetes | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
lint: | |
name: Lint manifests | |
strategy: | |
fail-fast: false | |
matrix: | |
kubernetes-version: | |
- 1.27.2 | |
runs-on: ubuntu-22.04 | |
env: | |
KUBECONFIG: /home/runner/.kube/config | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Find manifests | |
id: manifests | |
run: | | |
echo 'manifests<<EOF' >> "${GITHUB_OUTPUT}" | |
python3 scripts/python/find_manifests.py >> "${GITHUB_OUTPUT}" | |
echo 'EOF' >> "${GITHUB_OUTPUT}" | |
- name: Setup minikube | |
uses: medyagh/setup-minikube@96f4d627064f720ae7a9eb1116e590f9f1287867 | |
with: | |
driver: docker | |
cpus: 2 | |
memory: 2g | |
minikube-version: 1.32.0 | |
kubernetes-version: ${{ matrix.kubernetes-version }} | |
timeout-minutes: 3 | |
- name: Install CRDs | |
run: | | |
python3 -m pip install -r scripts/python/requirements.txt | |
python3 scripts/python/install_crds.py | |
- name: Lint manifests | |
uses: sid-maddy/k8s-lint@422eb61cf1b8c236657ddf7f09c2a1bb824b2500 # v3 | |
with: | |
lint-type: dry-run | |
manifests: ${{ steps.manifests.outputs.manifests }} |