feat: smart diagnostics + Docker Hub publishing

This commit is contained in:
rE-Bo0t.bx1
2025-11-06 02:06:46 +08:00
parent b8a495523d
commit 05a08e1366

View File

@@ -102,12 +102,39 @@ jobs:
pip install yamllint
echo "Validating YAML files..."
for yaml in templates/*.yml docs/*.yml .github/workflows/*.yml .github/dependabot.yml; do
# Lenient rules for template files (allow trailing spaces, long lines)
echo "📁 Checking templates (lenient rules)..."
for yaml in templates/*.yml; do
if [ -f "$yaml" ]; then
yamllint -d "{extends: relaxed, rules: {line-length: {max: 200}, trailing-spaces: disable, new-line-at-end-of-file: disable, comments: disable}}" "$yaml" && echo "✅ $yaml valid" || echo "⚠️ $yaml has warnings (non-blocking)"
fi
done
# Strict rules for workflow files
echo "⚙️ Checking workflows (strict rules)..."
for yaml in .github/workflows/*.yml; do
if [ -f "$yaml" ]; then
yamllint -d relaxed "$yaml" || exit 1
echo "✅ $yaml syntax valid"
fi
done
# Check dependabot if exists
if [ -f ".github/dependabot.yml" ]; then
yamllint -d relaxed .github/dependabot.yml || exit 1
echo "✅ .github/dependabot.yml syntax valid"
fi
# Optional: Check docs
if [ -d "docs" ]; then
echo "📚 Checking docs (lenient)..."
for yaml in docs/*.yml; do
if [ -f "$yaml" ]; then
yamllint -d "{extends: relaxed, rules: {line-length: {max: 200}, trailing-spaces: disable}}" "$yaml" && echo "✅ $yaml valid" || echo "⚠️ $yaml has warnings"
fi
done
fi
- name: 🔍 Validate JSON Files
run: |
@@ -458,7 +485,7 @@ jobs:
- ✅ Dockerfile validation with Hadolint
- ✅ Shell script syntax checking
- ✅ ShellCheck analysis
- ✅ YAML validation
- ✅ YAML validation (lenient for templates)
- ✅ JSON validation
- ✅ Documentation verification
- ✅ Docker image build (multi-arch ready)
@@ -472,7 +499,7 @@ jobs:
## Next Steps
If all checks pass:
- Image is ready for production use
- Release workflow will handle publishing to GHCR
- Release workflow will handle publishing to GHCR + Docker Hub
- Tag with semantic version to trigger release
EOF