Skip to content

Plugin Automation

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:

  1. Fetches the latest version metadata from the npm registry
  2. Updates plugins.json with the new version
  3. Commits the changes to trigger a documentation rebuild
  4. Deploys updated documentation to GitHub Pages

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"
}

The plugin repository needs a Personal Access Token (PAT) with repo scope and write access to the marketplace repository:

  1. Create a PAT at https://github.com/settings/tokens
  2. Grant repo scope (for repository dispatch)
  3. Add as secret MARKETPLACE_DISPATCH_TOKEN in the plugin repository

For tighter scoping, use a fine-grained PAT:

  1. Create at https://github.com/settings/personal-access-tokens
  2. Repository access: Select robinmordasiewicz/f5xc-marketplace
  3. Permissions: Contents (read/write)
  4. Add as secret in the plugin repository

The marketplace syncs plugins in three ways:

TriggerDescription
repository_dispatchImmediate sync when plugin sends webhook
workflow_dispatchManual trigger from GitHub Actions UI
scheduleEvery 6 hours as fallback

To manually trigger a sync:

  1. Go to Actions → Plugin Sync
  2. Click “Run workflow”
  3. Select plugin to sync (or “all”)
  4. Click “Run workflow”

Test the sync script locally:

Terminal window
# 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-console
FilePurpose
.github/workflows/plugin-sync.ymlHandles webhook dispatch and syncs
scripts/sync-npm-plugins.shFetches npm metadata and updates files
scripts/plugin-manager.shCLI for manual plugin management

The webhook dispatch expects this payload format:

{
"plugin": "f5xc-console",
"version": "0.10.1",
"repository": "robinmordasiewicz/f5xc-console",
"npm_package": "@robinmordasiewicz/f5xc-console"
}
FieldRequiredDescription
pluginYesPlugin key in plugins.json
versionNoSpecific version (defaults to npm latest)
repositoryNoSource repository for logging
npm_packageNonpm package name (read from plugins.json)