on: push: branches: - dev jobs: validate: runs-on: docker defaults: run: shell: sh env: DOCKER_HOST: tcp://localhost:2375 steps: - name: Setup run: apk add bash curl - name: Checkout uses: actions/checkout@v4 - name: Install kubeconform run: | wget -O- https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar xz mv kubeconform /usr/local/bin - name: Validate manifests run: | kubeconform \ -strict \ -summary \ -ignore-missing-schemas \ -schema-location default \ -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \ ./manifests/ - name: Debug docker run: | cat /etc/hosts wget -O- http://172.17.0.1:2375/info 2>&1 || true wget -O- http://172.18.0.1:2375/info 2>&1 || true - name: Install k3d run: | curl -fsSL -o /tmp/k3d https://github.com/k3d-io/k3d/releases/download/v5.7.4/k3d-linux-amd64 chmod +x /tmp/k3d mv /tmp/k3d /usr/local/bin - name: Create test cluster run: | k3d cluster create test --wait kubectl cluster-info - name: Apply manifests run: | kubectl apply -f manifests/ --recursive - name: Wait for deployments run: | kubectl wait --for=condition=available --timeout=120s deployment --all --all-namespaces - name: Cleanup if: always() run: | k3d cluster delete test