Dashboard →

CI and the GitHub Action

Every pull request that touches a model gets its optimized sizes and grade, and main pushes the version that ships.

The action

# .github/workflows/models.yml
name: models
on:
  pull_request:
    paths: ['models/**']
  push:
    branches: [main]
    paths: ['models/**']
permissions:
  contents: read
  pull-requests: write
jobs:
  push:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: chaseholdren/glboost-push-action@v1
        with:
          api-key: ${{ secrets.GLBOOST_API_KEY }}
          files: models/*.glb

The action runs glboost push --match-by-name --wait --json, so each file becomes a new version of the asset named like it (first run: a new asset), waits for the variants, writes the table to the job summary, and on pull requests keeps one comment up to date (found again by a hidden marker, never a second one):

| File      | Asset            | Original | compat  | gpu    | Grade | vs previous               |
| chair.glb | k7m2p9q4r1s8 v2  | 4.20 MB  | 1.10 MB | 620 KB | A     | −12 % (1.25 MB → 1.10 MB) |
api-key
Required. A key with the write scope; store it as a repository secret.
files
Required. Paths or globs (.glb, .gltf, .zip), space or newline separated.
preset
Extra presets to request after the push, e.g. "mobile web".
wait
Default true. Wait for the variants before reporting.
comment
Default true. Keep the sticky comment on pull requests.
note
Version note; defaults to the pull request title, else the commit subject.
match-by-name
Default true. Replace the asset named like the file instead of creating a new one each run.
base-url
API origin, default https://glboost.com.
cli-version
The glboost npm version the action runs (pinned per release).
outputs: report, assets
The push --json file, and the comma-separated asset ids.

A plan or size limit fails the step with exit code 2 and the upgrade URL in the log; a failed variant is listed in the comment but does not fail the step (the asset still has its other variants). The action's source lives in actions/push of the GLBoost repository and is mirrored to chaseholdren/glboost-push-action on release.

Other CI systems

npm install -g glboost
GLBOOST_API_KEY=$GLBOOST_API_KEY glboost push dist/*.glb --match-by-name --wait --json > glboost.json
glboost validate models/chair.gltf     # no key: fails the build on validator errors

The CLI is the same everywhere: see SDK and CLI for the commands and the JSON report, and the webhooks (asset.ready, variant.failed) when the pipeline should notify another system instead of waiting in CI.