Skip to content

Update model catalog #22

Update model catalog

Update model catalog #22

name: Update model catalog
on:
workflow_dispatch:
schedule:
- cron: "17 4 * * *"
permissions:
contents: write
concurrency:
group: update-model-catalog
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run sync
- run: bun run generate-readme
- run: bun run typecheck
- run: HOME="$(mktemp -d)" COMMANDCODE_API_KEY= COMMAND_CODE_API_KEY= bun test tests/unit/
- name: Commit catalog changes
run: |
if git diff --quiet -- models.json README.md; then
echo "Model catalog is already current"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add models.json README.md
git commit -m "Refresh Command Code model catalog"
git push