mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-25 13:10:13 +00:00
a5d12ba1d0
Node 20 reached EOL (2026-04-30); Node 22 is the current maintenance LTS and already the runtime the MCP container ships (node:22-slim). Straighten the version skew so per-component CI major == deploy runtime == engines floor: - ci.yml: web, mcp and guardrails setup-node 20 -> 22 - combine-rules.yml: setup-node 20 -> 22 - mcp package.json: add engines.node ">=22" (matches Dockerfile) - web package.json: add engines.node ">=22" (first explicit pin; SWA/Oryx no longer picks a Node version implicitly) engine-strict stays off (no .npmrc), so the pins are advisory and cannot hard-break local installs on other Node versions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
name: Validate & Combine Rules
|
|
on:
|
|
push:
|
|
branches: [main, dev]
|
|
paths:
|
|
- 'rules/gather/**'
|
|
- 'rules/analyze/**'
|
|
- 'rules/ime-log-patterns/**'
|
|
- 'rules/schema/**'
|
|
- 'rules/scripts/**'
|
|
pull_request:
|
|
paths:
|
|
- 'rules/gather/**'
|
|
- 'rules/analyze/**'
|
|
- 'rules/ime-log-patterns/**'
|
|
- 'rules/schema/**'
|
|
- 'rules/scripts/**'
|
|
|
|
jobs:
|
|
validate-and-combine:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Install ajv-cli
|
|
run: npm install -g ajv-cli ajv-formats
|
|
|
|
- name: Validate Gather Rules
|
|
run: |
|
|
for f in rules/gather/*.json; do
|
|
echo "Validating $f..."
|
|
ajv validate -s rules/schema/gather-rule.schema.json -d "$f" --spec=draft2020 -c ajv-formats
|
|
done
|
|
|
|
- name: Validate Analyze Rules
|
|
run: |
|
|
for f in rules/analyze/*.json; do
|
|
echo "Validating $f..."
|
|
ajv validate -s rules/schema/analyze-rule.schema.json -d "$f" --spec=draft2020 -c ajv-formats
|
|
done
|
|
|
|
- name: Validate IME Log Patterns
|
|
run: |
|
|
for f in rules/ime-log-patterns/*.json; do
|
|
echo "Validating $f..."
|
|
ajv validate -s rules/schema/ime-log-pattern.schema.json -d "$f" --spec=draft2020 -c ajv-formats
|
|
done
|
|
|
|
- name: Combine rules into dist/
|
|
run: node rules/scripts/combine.js
|
|
|
|
- name: Commit dist/ changes
|
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
uses: stefanzweifel/git-auto-commit-action@v7
|
|
with:
|
|
commit_message: "chore: regenerate rules/dist from individual files"
|
|
file_pattern: "rules/dist/*"
|