forked from gi-dellav/zerostack
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.38 KB
/
Copy pathupdate-models.yml
File metadata and controls
42 lines (34 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update model catalog
# Refreshes the embedded static model catalog (data/models.json) from
# models.dev on a schedule. The committed JSON stays the single build-time
# source of truth, so this only opens a PR when models.dev actually changes —
# builds remain offline and reproducible. See scripts/gen-models-catalog.sh.
on:
schedule:
# Weekly, Mondays 06:00 UTC.
- cron: '0 6 * * 1'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Regenerate catalog
run: ./scripts/gen-models-catalog.sh
- name: Open PR if changed
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: 'chore: refresh model catalog from models.dev'
title: 'chore: refresh model catalog from models.dev'
body: |
Automated refresh of `data/models.json` from https://models.dev/api.json
via `scripts/gen-models-catalog.sh`.
Review the diff for unexpected additions/removals before merging.
branch: chore/refresh-model-catalog
delete-branch: true
add-paths: data/models.json