Files
pi-commandcode-provider/.github/workflows/model-metadata.yml
T

90 lines
3.0 KiB
YAML

name: Command Code catalog sync
on:
pull_request:
branches: [main]
paths:
- ".github/scripts/check-commandcode-model-metadata.ts"
- ".github/workflows/model-metadata.yml"
- "src/commandcode-catalog.ts"
- "src/core.ts"
- "src/models.ts"
- "tests/test-model-metadata-check.ts"
schedule:
- cron: "17 6 * * *"
workflow_dispatch:
concurrency:
group: commandcode-catalog-${{ github.event_name == 'pull_request' && github.event.pull_request.number || 'sync' }}
cancel-in-progress: true
jobs:
check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- name: Compare with the latest Command Code CLI
run: npm run check:commandcode-catalog | tee commandcode-catalog-report.md
- name: Publish catalog report
if: always()
run: cat commandcode-catalog-report.md >> "$GITHUB_STEP_SUMMARY"
sync:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- name: Synchronize with the latest Command Code CLI
run: npm run sync:commandcode-catalog | tee commandcode-catalog-report.md
- name: Format and verify synchronized files
run: |
npm run format -- src/commandcode-catalog.ts README.md
npm run typecheck
npm run test:models
npm run format:check
git diff --check
- name: Publish catalog report
if: always()
run: cat commandcode-catalog-report.md >> "$GITHUB_STEP_SUMMARY"
- name: Create or update synchronization PR
uses: peter-evans/create-pull-request@v8
with:
branch: automation/commandcode-catalog
delete-branch: true
commit-message: "chore(models): sync Command Code catalog"
title: "chore(models): sync Command Code catalog"
body: |
Automated synchronization with the latest published `command-code` CLI package.
This updates only machine-readable compatibility metadata:
- CLI version used in the `x-command-code-version` header
- image-input capabilities
- supported reasoning efforts
- documented catalog snapshot version
Pricing remains review-only because CLI documentation does not represent every pricing tier and temporary promotion used by the provider.
assignees: patlux
add-paths: |
src/commandcode-catalog.ts
README.md