Skip to content

Commit f9798cf

Browse files
JohnMcLearclaude
andauthored
Add scheduled workflow to update all plugins daily (#7406)
Runs checkPlugin with autopush on all ether/ep_* repos daily at 06:00 UTC. Updates workflows, dependencies, linting, and version bumps across all plugins. Requires PLUGINS_PAT org secret with push access to all ep_* repos. Can also be triggered manually via workflow_dispatch. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 09df1ce commit f9798cf

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Update Plugins
2+
3+
on:
4+
schedule:
5+
- cron: '0 6 * * *' # Daily at 06:00 UTC
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
update-plugins:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out etherpad-lite
13+
uses: actions/checkout@v4
14+
15+
- uses: pnpm/action-setup@v3
16+
name: Install pnpm
17+
with:
18+
version: 10
19+
run_install: false
20+
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
26+
- name: Install bin dependencies
27+
working-directory: ./bin
28+
run: pnpm install
29+
30+
- name: Configure git
31+
run: |
32+
git config --global user.name 'github-actions[bot]'
33+
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
34+
35+
- name: Clone and update all plugins
36+
env:
37+
GH_TOKEN: ${{ secrets.PLUGINS_PAT }}
38+
run: |
39+
# Configure git to use the PAT for all ether/ repos
40+
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/ether/".insteadOf "https://github.com/ether/"
41+
42+
cd ..
43+
# List all ep_* repos from ether org
44+
plugins=$(gh repo list ether --limit 200 --json name --jq '.[] | select(.name | startswith("ep_")) | .name')
45+
46+
for plugin in $plugins; do
47+
echo "============================================================"
48+
echo "Processing $plugin"
49+
echo "============================================================"
50+
51+
# Clone if not present
52+
if [ ! -d "$plugin" ]; then
53+
git clone "https://github.com/ether/${plugin}.git" "$plugin" || { echo "SKIP: clone failed"; continue; }
54+
fi
55+
56+
# Pull latest
57+
(cd "$plugin" && git pull --ff-only) || { echo "SKIP: pull failed"; continue; }
58+
59+
# Run checkPlugin with autopush
60+
cd etherpad-lite/bin
61+
pnpm run checkPlugin "$plugin" autopush 2>&1 | tail -20 || echo "WARN: checkPlugin failed for $plugin"
62+
cd ../..
63+
done

0 commit comments

Comments
 (0)