claude-home/.gitea/workflows/kb-reindex.yml
Cal Corum 2900369fe0 ci: add Gitea Action to auto-reindex KB on markdown push
When .md files are pushed to main, the workflow sends an HMAC-signed
POST to the md-kb-rag webhook on manticore, which triggers git pull
+ incremental re-index of the knowledge base.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 07:04:47 -05:00

22 lines
588 B
YAML

name: Reindex Knowledge Base
on:
push:
branches: [main]
paths: ['**/*.md']
jobs:
reindex:
runs-on: ubuntu-latest
steps:
- name: Trigger KB re-index
env:
WEBHOOK_SECRET: ${{ secrets.KB_WEBHOOK_SECRET }}
run: |
BODY='{"ref":"refs/heads/main"}'
SIG=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | awk '{print $2}')
curl -sf -X POST http://10.10.0.226:8001/hooks/reindex \
-H "Content-Type: application/json" \
-H "x-gitea-signature: $SIG" \
-d "$BODY"