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>
This commit is contained in:
parent
e9fe38ff28
commit
2900369fe0
21
.gitea/workflows/kb-reindex.yml
Normal file
21
.gitea/workflows/kb-reindex.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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"
|
||||||
Loading…
Reference in New Issue
Block a user