Compare commits

..

3 Commits

Author SHA1 Message Date
43455e005e Add example-plugin-2
Some checks failed
Validate Plugin PR / validate (pull_request) Failing after 51s
2026-04-17 02:11:56 +10:00
2c5a011521 Document auto-generated index.json 2026-04-17 02:11:40 +10:00
513dc654b0 Add auto-index generation and update validation 2026-04-17 02:11:28 +10:00
4 changed files with 15 additions and 17 deletions

View File

@@ -48,6 +48,12 @@ for (const file of changedFiles) {
continue; continue;
} }
// Skip index.json - it's auto-generated
if (file === 'plugins/index.json') {
console.log(`⚠️ Note: index.json is auto-generated, should not be manually edited`);
continue;
}
const pluginId = file.replace('plugins/', '').replace('.json', ''); const pluginId = file.replace('plugins/', '').replace('.json', '');
// Check if file was added or removed // Check if file was added or removed

View File

@@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate index.json - name: Generate index.json
run: | run: |
@@ -30,7 +32,7 @@ jobs:
echo ", \"$plugin_id\"" >> index.json echo ", \"$plugin_id\"" >> index.json
fi fi
fi fi
done done | sed '$ s/,$//'
echo ' ]' >> index.json echo ' ]' >> index.json
echo '}' >> index.json echo '}' >> index.json
@@ -41,8 +43,8 @@ jobs:
git config user.email "actions@gitea.local" git config user.email "actions@gitea.local"
git add plugins/index.json git add plugins/index.json
if git diff --staged --quiet; then if git diff --staged --quiet; then
echo "No changes to commit" echo "No changes to index.json"
else else
git commit -m "Auto-update plugin index" git commit -m "Auto-update plugin index [skip ci]"
git push git push
fi fi

View File

@@ -55,9 +55,11 @@ Gitea Actions will automatically validate:
- ✅ Version format is valid - ✅ Version format is valid
- ✅ URLs are valid - ✅ URLs are valid
**Note:** Don't edit `plugins/index.json` - it's automatically generated when your PR is merged!
### 4. Merge ### 4. Merge
If validation passes, maintainer will merge your PR. If validation passes, maintainer will merge your PR. The `index.json` file will be automatically updated.
## 🗑️ Removing Your Plugin ## 🗑️ Removing Your Plugin

View File

@@ -1,12 +0,0 @@
{
"id": "example-plugin-2",
"name": "Example Plugin 2",
"version": "1.0.0",
"description": "A second example plugin demonstrating additional capabilities",
"author": "litruv",
"repository": "http://synbox.ruv.wtf:8418/litruv/Plugin-Example2.git",
"downloadUrl": "http://synbox.ruv.wtf:8418/litruv/Plugin-Example2/archive/main.zip",
"homepage": "http://synbox.ruv.wtf:8418/litruv/Plugin-Example2",
"tags": ["example", "demo", "filtering", "validation"],
"addedDate": "2026-04-17T00:00:00.000Z"
}