Update model catalog #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |