- Home
- Cloud Plugin Marketplace
- Plugin Automation
Plugin Automation
Overview
Section titled “Overview”When a plugin repository (e.g., f5xc-console) publishes a new release to npm,
it triggers a webhook to notify this marketplace. The marketplace then:
- Fetches the latest version metadata from the npm registry
- Updates
plugins.jsonwith the new version - Commits the changes to trigger a documentation rebuild
- Deploys updated documentation to GitHub Pages
Webhook dispatch setup
Section titled “Webhook dispatch setup”For plugin repositories
Section titled “For plugin repositories”To enable automatic sync when a plugin publishes a new release, add this step to the release workflow:
# In your plugin's .github/workflows/release.yml- name: Notify marketplace of new release if: success() uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.MARKETPLACE_DISPATCH_TOKEN }} repository: robinmordasiewicz/f5xc-marketplace event-type: plugin-release client-payload: | { "plugin": "f5xc-console", "version": "${{ env.NEW_VERSION }}", "repository": "${{ github.repository }}", "npm_package": "@robinmordasiewicz/f5xc-console" }Required secrets
Section titled “Required secrets”The plugin repository needs a Personal Access Token (PAT) with repo scope and write access to the marketplace repository:
- Create a PAT at https://github.com/settings/tokens
- Grant
reposcope (for repository dispatch) - Add as secret
MARKETPLACE_DISPATCH_TOKENin the plugin repository
Alternative: fine-grained token
Section titled “Alternative: fine-grained token”For tighter scoping, use a fine-grained PAT:
- Create at https://github.com/settings/personal-access-tokens
- Repository access: Select
robinmordasiewicz/f5xc-marketplace - Permissions: Contents (read/write)
- Add as secret in the plugin repository
Sync triggers
Section titled “Sync triggers”The marketplace syncs plugins in three ways:
| Trigger | Description |
|---|---|
repository_dispatch | Immediate sync when plugin sends webhook |
workflow_dispatch | Manual trigger from GitHub Actions UI |
schedule | Every 6 hours as fallback |
Manual sync
Section titled “Manual sync”To manually trigger a sync:
- Go to Actions → Plugin Sync
- Click “Run workflow”
- Select plugin to sync (or “all”)
- Click “Run workflow”
Local testing
Section titled “Local testing”Test the sync script locally:
# Sync all npm plugins./scripts/sync-npm-plugins.sh
# Check current plugin versions./scripts/plugin-manager.sh list
# Get npm package info./scripts/plugin-manager.sh npm-info f5xc-consoleWorkflow files
Section titled “Workflow files”| File | Purpose |
|---|---|
.github/workflows/plugin-sync.yml | Handles webhook dispatch and syncs |
scripts/sync-npm-plugins.sh | Fetches npm metadata and updates files |
scripts/plugin-manager.sh | CLI for manual plugin management |
Payload format
Section titled “Payload format”The webhook dispatch expects this payload format:
{ "plugin": "f5xc-console", "version": "0.10.1", "repository": "robinmordasiewicz/f5xc-console", "npm_package": "@robinmordasiewicz/f5xc-console"}| Field | Required | Description |
|---|---|---|
plugin | Yes | Plugin key in plugins.json |
version | No | Specific version (defaults to npm latest) |
repository | No | Source repository for logging |
npm_package | No | npm package name (read from plugins.json) |