sync-marketplace-from-sources #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: sync-marketplace-from-sources | |
| on: | |
| schedule: | |
| - cron: "*/10 * * * *" # every 10 min — keep rolling commit hashes fresh | |
| workflow_dispatch: {} | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".claude-plugin/marketplace.json" | |
| - "scripts/sync_marketplace.py" | |
| - "scripts/build_readme.py" | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Sync marketplace metadata from each plugin source | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: python scripts/sync_marketplace.py | |
| - name: Regenerate README from the catalog | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: python scripts/build_readme.py | |
| - name: Commit if changed | |
| run: | | |
| if ! git diff --quiet -- .claude-plugin/marketplace.json README.md; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add .claude-plugin/marketplace.json README.md | |
| git commit -m "chore: auto-sync catalog + regenerate README from sources" | |
| git push | |
| else | |
| echo "already in sync" | |
| fi |