Skip to content

Cleanup

Cleanup #19

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 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/v1.2.3/helmfile_1.2.3_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"