feat: publish curated marketplace artifacts #61
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 artifacts | |
| on: | |
| pull_request: | |
| paths: | |
| - README.md | |
| - plugins.json | |
| - .agents/plugins/marketplace.json | |
| - plugins/** | |
| - scripts/generate_plugins_json.py | |
| push: | |
| branches: [main] | |
| paths: | |
| - README.md | |
| - plugins.json | |
| - .agents/plugins/marketplace.json | |
| - plugins/** | |
| - scripts/generate_plugins_json.py | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| name: Sync marketplace artifacts with README | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Regenerate and commit if changed | |
| run: | | |
| python3 scripts/generate_plugins_json.py | |
| if ! git diff --quiet -- plugins.json .agents/plugins/marketplace.json plugins; then | |
| echo "::notice::marketplace artifacts were out of sync — auto-committing" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add plugins.json .agents/plugins/marketplace.json plugins | |
| git commit -m "chore: sync marketplace artifacts with README" | |
| git push | |
| else | |
| echo "marketplace artifacts are up to date" | |
| fi |