mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-08 15:35:24 +02:00
- move each template's metadata to blueprints/<id>/meta.json (442 files, byte-identical roundtrip with the old root meta.json) - generate the served meta.json at build time into app/public/meta.json (gitignored); pnpm dev/build run the generator first - CI validates every blueprints/<id>/meta.json via generate-meta.js --check (required fields, id/folder match, logo exists, folder<->meta bidirectionality) and rejects any committed root meta.json - remove root meta.json, dedupe-and-sort-meta.js and build-scripts/process-meta.js (obsolete) - update CONTRIBUTING.md, AGENTS.md and README.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: Validate Blueprints Structure and Meta
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- canary
|
|
push:
|
|
branches:
|
|
- canary
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Validate blueprint folders and files
|
|
run: |
|
|
echo "🔍 Validating blueprints folder structure..."
|
|
|
|
ERROR=0
|
|
|
|
# Loop through each blueprint folder
|
|
for dir in blueprints/*; do
|
|
if [ -d "$dir" ]; then
|
|
TEMPLATE_NAME=$(basename "$dir")
|
|
|
|
COMPOSE_FILE="$dir/docker-compose.yml"
|
|
TEMPLATE_FILE="$dir/template.toml"
|
|
|
|
if [ ! -f "$COMPOSE_FILE" ]; then
|
|
echo "❌ Missing docker-compose.yml in $TEMPLATE_NAME"
|
|
ERROR=1
|
|
fi
|
|
|
|
if [ ! -f "$TEMPLATE_FILE" ]; then
|
|
echo "❌ Missing template.toml in $TEMPLATE_NAME"
|
|
ERROR=1
|
|
fi
|
|
fi
|
|
done
|
|
|
|
if [ $ERROR -eq 1 ]; then
|
|
echo "❌ Blueprint folder validation failed."
|
|
exit 1
|
|
else
|
|
echo "✅ Blueprint folders validated successfully."
|
|
fi
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Validate per-template metadata (blueprints/<id>/meta.json)
|
|
run: node build-scripts/generate-meta.js --check
|