| 1 | name: Marketplace connection |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | |
| 6 | permissions: |
| 7 | contents: read |
| 8 | |
| 9 | jobs: |
| 10 | catalog: |
| 11 | runs-on: ubuntu-24.04 |
| 12 | timeout-minutes: 10 |
| 13 | steps: |
| 14 | - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 |
| 15 | with: |
| 16 | path: core |
| 17 | persist-credentials: false |
| 18 | - name: Select catalog revision |
| 19 | id: source |
| 20 | working-directory: core |
| 21 | env: |
| 22 | EVENT_NAME: ${{ github.event_name }} |
| 23 | run: | |
| 24 | python3 - <<'PY' |
| 25 | import json, os, re |
| 26 | snapshot = json.load(open('crates/plugins/assets/first-party-marketplace.json')) |
| 27 | revision = snapshot['revision'] |
| 28 | assert re.fullmatch(r'[0-9a-f]{40}', revision), 'Invalid marketplace revision' |
| 29 | if os.environ['EVENT_NAME'] in ('schedule', 'workflow_dispatch'): |
| 30 | revision = 'main' |
| 31 | with open(os.environ['GITHUB_OUTPUT'], 'a') as output: |
| 32 | output.write(f'revision={revision}\n') |
| 33 | PY |
| 34 | - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 |
| 35 | with: |
| 36 | repository: codewhale-hq/codewhale-plugin-marketplace |
| 37 | ref: ${{ steps.source.outputs.revision }} |
| 38 | path: marketplace |
| 39 | persist-credentials: false |
| 40 | - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 |
| 41 | with: |
| 42 | node-version: '22' |
| 43 | package-manager-cache: false |
| 44 | - name: Check catalog and real bundle manifests |
| 45 | run: node marketplace/scripts/check-marketplace.mjs |
| 46 | - name: Check snapshot pin rules |
| 47 | run: python3 core/scripts/test-sync-marketplace.py |
| 48 | - name: Check bundled catalog snapshot |
| 49 | run: python3 core/scripts/sync-marketplace.py --marketplace marketplace --check |
| 50 | - name: Check current skill mirrors |
| 51 | if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' |
| 52 | run: | |
| 53 | node marketplace/scripts/check-marketplace.mjs --core core |
| 54 | - name: Explain a drift failure |
| 55 | if: failure() |
| 56 | run: | |
| 57 | echo 'Review upstream changes using docs/PLUGIN_MARKETPLACE.md. Sync source-owned mirrors, rerun checks, regenerate the catalog, and rebuild. This workflow never installs, trusts, enables, or publishes plugins.' >> "$GITHUB_STEP_SUMMARY" |
| 58 |