GitHub Action
This repository contains a GitHub Action that flags model ids in a checkout.
The example below uses alixgrosbard/model-migrate/action@cursor/sunsetdiff-v1-3cab, the ref that contains action/action.yml on the branch this site deploys from.
Publisher: SunsetDiff.
What it does
The Action file is action/action.yml. It runs action/dist/index.js on Node 20. It is not listed in this repository as a Marketplace action.
It checks out nothing by itself. The workflow below uses actions/checkout first, which is the checkout step this repository's own workflows use. The scanner then reads the workspace.
It skips directories named node_modules, .git, dist, and snapshots. Other files are kept when they match the paths glob.
It loads the models JSON from api-url. The default is the compact array at /api/v1/models.json on sunsetdiff.onrender.com. If that response is not a non-empty JSON array, it uses the bundled file action/snapshot/models.json. The static generator writes that file from the same compact rows.
A model is reported when its status is retired, deprecated, or legacy. A model with another status is reported when it has a shutdown date, the date kind is not not_before or none, and the date is within warn-days.
The finding is an error when the status is retired, or the shutdown date is within fail-days. Other findings are warnings. Each one is an annotation on the file and line. The job summary is a table. The job fails when there is at least one error. The failure text says that many model ids are inside the fail window or already retired.
The annotation links to https://sunsetdiff.onrender.com/models/<provider>/<slug>/. That host is the one written in the scanner. The public site is https://sunsetdiff.com.
The Action reads files and writes annotations and the job summary. It does not commit, and it does not send email.
A separate check that does not use this Action is the ripgrep pattern on the scan page.
Inputs
| Input | Required | Default | Meaning |
|---|---|---|---|
paths | no | **/*.{py,ts,js,json,yaml,yml,toml,env.example} | Glob of files to scan. The bundled scanner walks the repo and keeps these extensions. |
warn-days | no | 60 | Warn when a shutdown is within this many days. |
fail-days | no | 14 | Fail the job when a shutdown is within this many days, or the model is already retired. |
api-url | no | https://sunsetdiff.onrender.com/api/v1/models.json | Models JSON URL. A bundled snapshot is used when this is unreachable. |
Workflow
name: Check model ids
on:
pull_request:
jobs:
sunsetdiff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: alixgrosbard/model-migrate/action@cursor/sunsetdiff-v1-3cab
with:
paths: "**/*.{py,ts,js,json,yaml,yml,toml,env.example}"
warn-days: "60"
fail-days: "14"
api-url: "https://sunsetdiff.onrender.com/api/v1/models.json"