GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(ci): refresh v2 models.dev snapshot on a schedule (#50030) · WarGloom/opencode@83abc64

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • models-snapshot.yml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/models-snapshot.yml‎

Copy file name to clipboard
+62Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: models-snapshot
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: "*/30 * * * *"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}
13+
cancel-in-progress: false
14+
15+
jobs:
16+
refresh:
17+
if: github.repository == 'anomalyco/opencode'
18+
runs-on: blacksmith-4vcpu-ubuntu-2404
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
23+
with:
24+
persist-credentials: false
25+
ref: v2
26+
27+
# The refresh script only needs `fetch`; skip the monorepo install.
28+
- name: Setup Bun
29+
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
30+
with:
31+
bun-version-file: package.json
32+
33+
- name: Setup git committer
34+
uses: ./.github/actions/setup-git-committer
35+
with:
36+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
37+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
38+
39+
- name: Refresh snapshot
40+
run: bun packages/core/script/update-models-snapshot.ts
41+
42+
- name: Commit changes
43+
run: |
44+
set -euo pipefail
45+
46+
FILE="packages/core/src/models-dev/snapshot.txt"
47+
48+
if [ -z "$(git status --short -- "$FILE")" ]; then
49+
echo "No changes to commit"
50+
echo "### models.dev snapshot" >> "$GITHUB_STEP_SUMMARY"
51+
echo "Status: no changes" >> "$GITHUB_STEP_SUMMARY"
52+
exit 0
53+
fi
54+
55+
git add "$FILE"
56+
git commit -m "chore(core): refresh bundled models.dev snapshot"
57+
58+
git pull --rebase --autostash origin v2
59+
git push origin HEAD:v2 --no-verify
60+
61+
echo "### models.dev snapshot" >> "$GITHUB_STEP_SUMMARY"
62+
echo "Status: committed $(git rev-parse --short HEAD)" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.