From 2900369fe0ea60082830c457998d77b9055b7f49 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 12 Mar 2026 07:04:47 -0500 Subject: [PATCH] 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 --- .gitea/workflows/kb-reindex.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitea/workflows/kb-reindex.yml diff --git a/.gitea/workflows/kb-reindex.yml b/.gitea/workflows/kb-reindex.yml new file mode 100644 index 0000000..7a234d2 --- /dev/null +++ b/.gitea/workflows/kb-reindex.yml @@ -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"