mirror of
https://github.com/jgraph/drawio-mcp.git
synced 2026-09-14 15:42:06 +08:00
d77202c8f8
Listens for repository_dispatch from drawio-dev when a new version tag is pushed, regenerates search-index.json, and opens a PR if changed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
name: Update Shape Search Index
|
|
|
|
on:
|
|
repository_dispatch:
|
|
types: [drawio-release]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-index:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Install dependencies
|
|
run: cd shape-search && npm ci
|
|
|
|
- name: Generate search index
|
|
run: cd shape-search && npm run generate
|
|
|
|
- name: Check for changes
|
|
id: diff
|
|
run: |
|
|
if git diff --quiet shape-search/search-index.json; then
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Create pull request
|
|
if: steps.diff.outputs.changed == 'true'
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
commit-message: "chore: update shape search index"
|
|
branch: update-search-index
|
|
title: "chore: update shape search index"
|
|
body: |
|
|
Auto-generated after a new draw.io release.
|
|
|
|
Triggered by: `${{ github.event_name }}` ${{ github.event.client_payload.tag && format('(tag: {0})', github.event.client_payload.tag) || '' }}
|
|
delete-branch: true
|