-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.72 KB
/
sync.yml
File metadata and controls
59 lines (49 loc) · 1.72 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
49
50
51
52
53
54
55
56
57
58
59
name: Sync derived artifacts
on:
push:
branches: [main]
paths:
- "registry.json"
workflow_dispatch:
permissions: {}
concurrency:
group: registry-sync
cancel-in-progress: false
jobs:
sync:
name: Sync README, CLAUDE.md, and docs from registry
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Regenerate derived artifacts
run: python3 scripts/sync_from_registry.py
- name: Detect drift
id: drift
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Open pull request with sync
if: steps.drift.outputs.changed == 'true'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
branch: chore/registry-sync
delete-branch: true
commit-message: "chore: sync derived artifacts from registry"
title: "chore: sync derived artifacts from registry"
body: |
Automated sync from `registry.json`.
Regenerated:
- `README.md` tools table, descriptions, and stats
- `CLAUDE.md` cataloged tools table and totals
- `docs/index.html` embedded registry block
Review the diff for accuracy. About section on GitHub is not updated by this workflow; the maintainer runs `python scripts/sync_from_registry.py --about` locally and pipes to `gh repo edit`.
labels: registry,automated