Skip to content

chore: Remove k3d dry-run check #6

chore: Remove k3d dry-run check

chore: Remove k3d dry-run check #6

Workflow file for this run

name: Lint and Check
on:
pull_request: {}
push:
branches: [ main ]
jobs:
lint:
name: 🔍 Lint Shell Scripts and YAML
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
- name: 🔧 Setup Prerequisites
run: |
echo "🔧 Installing all prerequisites in one step..."
# Update package lists
sudo apt-get update
# Install system packages
sudo apt-get install -y shellcheck python3-pip
# Install Python packages
pip3 install yamllint
# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Install k3d
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
# Install helmfile
curl -L https://github.com/helmfile/helmfile/releases/download/v0.156.0/helmfile_0.156.0_linux_amd64.tar.gz | tar xz
sudo mv helmfile /usr/local/bin/
echo "✅ All prerequisites installed successfully"
- name: 🐚 Lint Shell Scripts
run: |
echo "🔍 Linting shell scripts..."
find . -name "*.sh" -type f -exec shellcheck {} + || {
echo "❌ Shell script linting failed"
exit 1
}
echo "✅ All shell scripts passed linting"
- name: 📄 Lint YAML Files
run: |
echo "🔍 Linting YAML files..."
yamllint . || {
echo "❌ YAML linting failed"
exit 1
}
echo "✅ All YAML files passed linting"
- name: 📦 Validate Helm Charts
run: |
echo "🔍 Validating Helm charts..."
helmfile lint || {
echo "❌ Helm chart validation failed"
exit 1
}
echo "✅ All Helm charts are valid"
- name: ☸️ Validate Kubernetes Manifests
run: |
echo "🔍 Validating Kubernetes manifests..."
kubectl apply --dry-run=client -f manifests/ || {
echo "❌ Kubernetes manifest validation failed"
exit 1
}
echo "✅ All Kubernetes manifests are valid"