-
Notifications
You must be signed in to change notification settings - Fork 36
46 lines (43 loc) · 1.36 KB
/
validate-plugins.yml
File metadata and controls
46 lines (43 loc) · 1.36 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
name: Sync marketplace artifacts
on:
pull_request:
paths:
- README.md
- plugins.json
- .agents/plugins/marketplace.json
- plugins/**
- scripts/generate_plugins_json.py
push:
branches: [main]
paths:
- README.md
- plugins.json
- .agents/plugins/marketplace.json
- plugins/**
- scripts/generate_plugins_json.py
permissions:
contents: write
jobs:
sync:
name: Sync marketplace artifacts with README
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Regenerate and commit if changed
run: |
python3 scripts/generate_plugins_json.py
if ! git diff --quiet -- plugins.json .agents/plugins/marketplace.json plugins; then
echo "::notice::marketplace artifacts were out of sync — auto-committing"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add plugins.json .agents/plugins/marketplace.json plugins
git commit -m "chore: sync marketplace artifacts with README"
git push
else
echo "marketplace artifacts are up to date"
fi