-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Add scheduled workflow to update all plugins daily #7406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: Update Plugins | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 6 * * *' # Daily at 06:00 UTC | ||
| workflow_dispatch: # Allow manual trigger | ||
|
|
||
| jobs: | ||
| update-plugins: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out etherpad-lite | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - uses: pnpm/action-setup@v3 | ||
| name: Install pnpm | ||
| with: | ||
| version: 10 | ||
| run_install: false | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install bin dependencies | ||
| working-directory: ./bin | ||
| run: pnpm install | ||
|
|
||
| - name: Configure git | ||
| run: | | ||
| git config --global user.name 'github-actions[bot]' | ||
| git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
|
|
||
| - name: Clone and update all plugins | ||
| env: | ||
| GH_TOKEN: ${{ secrets.PLUGINS_PAT }} | ||
| run: | | ||
| # Configure git to use the PAT for all ether/ repos | ||
| git config --global url."https://x-access-token:${GH_TOKEN}@github.com/ether/".insteadOf "https://github.com/ether/" | ||
|
|
||
| cd .. | ||
| # List all ep_* repos from ether org | ||
| plugins=$(gh repo list ether --limit 200 --json name --jq '.[] | select(.name | startswith("ep_")) | .name') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3. Repo list truncation The workflow only lists the first 200 repos from the ether org, so any additional ep_* repos beyond that will never be processed. This breaks the stated goal of updating all ether/ep_* plugins daily. Agent Prompt
|
||
|
|
||
| for plugin in $plugins; do | ||
|
Comment on lines
+44
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 4. Core repo not excluded The workflow processes every repo whose name starts with ep_ without excluding ep_etherpad-lite, which existing plugin automation explicitly skips. If ep_etherpad-lite is present in the org, this workflow could create automated commits/pushes to that repo unintentionally. Agent Prompt
|
||
| echo "============================================================" | ||
| echo "Processing $plugin" | ||
| echo "============================================================" | ||
|
|
||
| # Clone if not present | ||
| if [ ! -d "$plugin" ]; then | ||
| git clone "https://github.com/ether/${plugin}.git" "$plugin" || { echo "SKIP: clone failed"; continue; } | ||
| fi | ||
|
|
||
| # Pull latest | ||
| (cd "$plugin" && git pull --ff-only) || { echo "SKIP: pull failed"; continue; } | ||
|
|
||
| # Run checkPlugin with autopush | ||
| cd etherpad-lite/bin | ||
| pnpm run checkPlugin "$plugin" autopush 2>&1 | tail -20 || echo "WARN: checkPlugin failed for $plugin" | ||
|
Comment on lines
+60
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Pipeline hides failures The checkPlugin command is piped to tail, so the workflow step uses tail’s exit code and can report success even when checkPlugin fails for a plugin. This can silently skip updates/pushes while still printing only the last 20 lines of output. Agent Prompt
|
||
| cd ../.. | ||
| done | ||
|
Comment on lines
+10
to
+63
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Scheduled workflow runs by default
📘 Rule violation☼ ReliabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools