Skip to content

Commit 76ab7d8

Browse files
author
internet-dot
committed
Fix CI: auto-sync plugins.json, ignore hol.org from link check
- validate-plugins.yml: auto-commit regenerated plugins.json instead of failing on race conditions when PRs don't update plugins.json - .mlc_config.json: add hol.org to ignore patterns (returns 503 intermittently)
1 parent 71bff7d commit 76ab7d8

2 files changed

Lines changed: 18 additions & 27 deletions

File tree

.github/workflows/validate-plugins.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Validate plugins.json
1+
name: Sync plugins.json
22

33
on:
44
pull_request:
@@ -13,23 +13,30 @@ on:
1313
- plugins.json
1414
- scripts/generate_plugins_json.py
1515

16+
permissions:
17+
contents: write
18+
1619
jobs:
17-
validate:
18-
name: Check plugins.json matches README
20+
sync:
21+
name: Sync plugins.json with README
1922
runs-on: ubuntu-latest
20-
permissions:
21-
contents: read
2223
steps:
2324
- uses: actions/checkout@v4
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
2427
- uses: actions/setup-python@v5
2528
with:
2629
python-version: "3.12"
27-
- name: Regenerate and compare
30+
- name: Regenerate and commit if changed
2831
run: |
2932
python3 scripts/generate_plugins_json.py
3033
if ! git diff --quiet plugins.json; then
31-
echo "::error::plugins.json is out of sync with README.md. Run: python3 scripts/generate_plugins_json.py"
32-
git diff plugins.json
33-
exit 1
34+
echo "::notice::plugins.json was out of sync — auto-committing"
35+
git config user.name "github-actions[bot]"
36+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
37+
git add plugins.json
38+
git commit -m "chore: sync plugins.json with README"
39+
git push
40+
else
41+
echo "plugins.json is up to date"
3442
fi
35-
echo "plugins.json is up to date"

.mlc_config.json

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
{
2-
"ignorePatterns": [
3-
{
4-
"pattern": "^https://developers.openai.com"
5-
},
6-
{
7-
"pattern": "^https://awesome.re"
8-
},
9-
{
10-
"pattern": "^https://community.openai.com"
11-
}
12-
],
13-
"aliveStatusCodes": [200, 301, 302, 403],
14-
"retryOn429": true,
15-
"retryCount": 5,
16-
"fallbackRetryDelay": 30000
17-
}
1+
{"ignorePatterns":[{"pattern":"^https://developers.openai.com"},{"pattern":"^https://awesome.re"},{"pattern":"^https://community.openai.com"},{"pattern":"^https://hol.org"}],"aliveStatusCodes":[200,301,302,403],"retryOn429":true,"retryCount":5,"fallbackRetryDelay":30000}

0 commit comments

Comments
 (0)