Files
templates/.github/workflows/validate-meta.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

42 lines
1017 B
YAML

name: Validate Template Metadata
on:
push:
branches: [canary]
paths:
- "blueprints/**"
- "build-scripts/generate-meta.js"
- "meta.json"
pull_request:
branches: [canary]
paths:
- "blueprints/**"
- "build-scripts/generate-meta.js"
- "meta.json"
workflow_dispatch:
jobs:
validate-meta:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Reject root meta.json
run: |
if [ -f "meta.json" ]; then
echo "❌ The root meta.json is generated at build time and must not be committed."
echo " Add your template's metadata to blueprints/<id>/meta.json instead."
exit 1
fi
echo "✅ No root meta.json present"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Validate per-template metadata
run: node build-scripts/generate-meta.js --check