Files
templates/.github/workflows/validate.yml
Mauricio Siu c3de62fb83 feat: per-template metadata — eliminate meta.json merge conflicts
- 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>
2026-07-07 23:58:10 -06:00

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