-
Notifications
You must be signed in to change notification settings - Fork 339
48 lines (39 loc) · 1.3 KB
/
Copy pathupdate-search-index.yml
File metadata and controls
48 lines (39 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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@v5
- uses: actions/setup-node@v5
with:
node-version: "22"
- 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@v8
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