Compare commits

...

2 Commits

2 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
name: Update Plugin Index
on:
push:
branches: [ main ]
paths:
- 'plugins/*.json'
jobs:
update-index:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate index.json
run: |
cd plugins
echo '{' > index.json
echo ' "version": "1.0.0",' >> index.json
echo ' "updatedAt": "'$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")'",' >> index.json
echo ' "plugins": [' >> index.json
first=true
for file in *.json; do
if [ "$file" != "index.json" ]; then
plugin_id="${file%.json}"
if [ "$first" = true ]; then
echo " \"$plugin_id\"" >> index.json
first=false
else
echo " ,\"$plugin_id\"" >> index.json
fi
fi
done
echo ' ]' >> index.json
echo '}' >> index.json
- name: Commit index.json
run: |
git config user.name "Gitea Actions"
git config user.email "actions@gitea.local"
git add plugins/index.json
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-update plugin index"
git push
fi

View File

@@ -0,0 +1,12 @@
{
"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"
}