Skip to content

feat(container): update image ghcr.io/home-operations/qbittorrent ( 5.1.4 → 5.2.0 ) #9970

feat(container): update image ghcr.io/home-operations/qbittorrent ( 5.1.4 → 5.2.0 )

feat(container): update image ghcr.io/home-operations/qbittorrent ( 5.1.4 → 5.2.0 ) #9970

---
name: Schema Validation
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
jobs:
filter:
name: Schema Validation - Filter
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.changed_files }}
steps:
- name: Get Changed Files
id: changed-files
uses: bjw-s-labs/action-changed-files@a9a36fb08ce06db9b02fbd8026cc2c0945eb9841 # v0.6.0
with:
patterns: |-
.github/workflows/schema-validation.yaml
kubernetes/**/*.yaml
kubernetes/**/*.yml
validate-schemas:
if: ${{ needs.filter.outputs.changed-files != '[]' }}
needs: filter
name: Schema Validation - Validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24'
- name: Install Python dependencies for schema validation
run: |
sudo apt-get update
sudo apt-get install -y python3-pip python3-yaml python3-jsonschema python3-requests
- name: Install yq for YAML processing
uses: mikefarah/yq@751d8ad57b84f1794661bc70c0afb92a22ad7b3c # v4.53.2
- name: Validate YAML Syntax
run: |
echo "🔍 Validating YAML syntax for all files..."
failed_files=()
total_files=0
# Find all YAML files
for file in $(find kubernetes -name "*.yaml" -o -name "*.yml" -type f); do
total_files=$((total_files + 1))
# Check YAML syntax
if yq eval 'true' "$file" >/dev/null 2>&1; then
echo "✅ $file - Valid YAML syntax"
else
echo "❌ $file - Invalid YAML syntax"
failed_files+=("$file")
fi
done
echo "📊 Checked YAML syntax for $total_files files"
if [ ${#failed_files[@]} -ne 0 ]; then
echo "💥 Failed YAML syntax validation for ${#failed_files[@]} files:"
printf '%s\n' "${failed_files[@]}"
exit 1
fi
- name: Validate Kustomization Schemas
run: |
echo "🔍 Validating Kustomization files against official schema..."
python3 scripts/validate-kustomizations.py kubernetes
- name: Check Schema URLs
run: |
echo "🔍 Checking all schema URLs are accessible..."
# Extract all schema URLs from files
schema_urls=$(find kubernetes -name "*.yaml" -exec grep -h "yaml-language-server.*schema" {} \; 2>/dev/null | \
sed -n 's/.*\$schema=\([^[:space:]]*\).*/\1/p' | \
sort -u)
failed_urls=()
echo "$schema_urls" | while IFS= read -r url; do
if [ -n "$url" ]; then
echo "Checking: $url"
if curl -s -f -I "$url" >/dev/null 2>&1; then
echo "✅ $url - Accessible"
else
echo "❌ $url - Not accessible"
echo "$url" >> /tmp/failed_urls.txt
fi
fi
done
if [ -f /tmp/failed_urls.txt ]; then
echo "💥 Failed to access schema URLs:"
cat /tmp/failed_urls.txt
exit 1
else
echo "🎉 All schema URLs are accessible!"
fi
- name: Validate Common CRD Schemas
run: |
echo "🔍 Validating common Kubernetes CRD files..."
# Test a few key CRD types that we know have schemas
validated_count=0
# Validate HelmRelease files
for file in $(find kubernetes -name "*.yaml" -exec grep -l "kind: HelmRelease" {} \; 2>/dev/null); do
echo "Validating HelmRelease: $file"
if yq eval -o=json "$file" > /tmp/temp.json && jq -e '.apiVersion and .kind and (.kind == "HelmRelease")' /tmp/temp.json >/dev/null 2>&1; then
echo "✅ $file - Valid HelmRelease structure"
validated_count=$((validated_count + 1))
else
echo "⚠️ $file - HelmRelease structure validation issues (non-blocking)"
fi
done
# Validate ExternalSecret files
for file in $(find kubernetes -name "*.yaml" -exec grep -l "kind: ExternalSecret" {} \; 2>/dev/null); do
echo "Validating ExternalSecret: $file"
if yq eval -o=json "$file" > /tmp/temp.json && jq -e '.apiVersion and .kind and (.kind == "ExternalSecret")' /tmp/temp.json >/dev/null 2>&1; then
echo "✅ $file - Valid ExternalSecret structure"
validated_count=$((validated_count + 1))
else
echo "⚠️ $file - ExternalSecret structure validation issues (non-blocking)"
fi
done
echo "📊 Successfully validated $validated_count CRD files"
- name: Summary
if: always()
run: |
echo "📋 Schema Validation Summary"
echo "=========================="
echo "✅ YAML syntax validation completed"
echo "✅ Kustomization files validated against official JSON schema"
echo "✅ Schema URL accessibility verified"
echo "✅ Common CRD files validated"
echo ""
echo "This ensures all YAML files have:"
echo "- Valid syntax"
echo "- Correct schema validation"
echo "- Accessible schema URLs for IDE support"