ci(models): open PRs for Command Code catalog updates

This commit is contained in:
Patrick Wozniak
2026-08-25 15:08:29 +02:00
parent 3d8758fe3b
commit c3a383447c
3 changed files with 62 additions and 11 deletions
+60 -9
View File
@@ -1,4 +1,4 @@
name: Command Code model metadata
name: Command Code catalog sync
on:
pull_request:
@@ -6,6 +6,7 @@ on:
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"
@@ -13,17 +14,17 @@ on:
- cron: "17 6 * * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: commandcode-model-metadata
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
@@ -32,8 +33,58 @@ jobs:
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- name: Compare static metadata with the latest Command Code CLI
run: npm run check:model-metadata | tee model-metadata-report.md
- name: Publish metadata report
- 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 model-metadata-report.md >> "$GITHUB_STEP_SUMMARY"
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 CHANGELOG.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
CHANGELOG.md