Files
plugins/.github/workflows/tagged.yml
T
yetone 4ecf633125 tagged: keep each listed plugin's README on dist (readmes/), so magpie's Discover page reads it from usemagpie.ai, not npm (River_WLan on X)
Run: node scripts/tagged.mjs on wsl against the real GitHub into an empty folder: 369 plugins, 369 README files (5.5MB); a second run into the same folder read none again and kept 369. Not tried: the workflow itself on Actions (dispatched after the push).
2026-11-11 16:01:13 +08:00

47 lines
1.5 KiB
YAML

# Builds tagged.json on the `dist` branch every half hour: the repositories
# tagged magpie-plugin, which magpie's Plugins page lists under Discover.
# magpie reads it through usemagpie.ai/api/plugins/tagged, so a desktop that
# can't reach GitHub, or is rate-limited there, still has the list. Each
# listed plugin's README is kept beside it (readmes/), read through
# usemagpie.ai/api/plugins/readme, so npm's human check can't hold it back.
name: tagged
on:
schedule:
- cron: "7,37 * * * *"
workflow_dispatch:
permissions:
contents: write # pushes the dist branch
concurrency: dist-branch
jobs:
tagged:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- name: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
if git fetch --depth=1 origin dist; then
git worktree add -B dist "$RUNNER_TEMP/dist" FETCH_HEAD
else
git worktree add --orphan -b dist "$RUNNER_TEMP/dist"
fi
node scripts/tagged.mjs "$RUNNER_TEMP/dist"
cd "$RUNNER_TEMP/dist"
git add -A tagged.json readmes
if git diff --cached --quiet; then
echo "tagged.json is current"
else
git commit -q -m "tagged: $(date -u +%FT%H:%MZ)"
git push origin dist
fi