q1sh101/Build Size Diff
Track bundle size on push/PRs. Auto-comment with gzip/brotli metrics. Works with Vite, Webpack, Next.js, and more.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| build-command | Build command to run | no | npm run build |
| build-timeout-minutes | Max minutes to allow build to run before failing | no | 15 |
| allow-unsafe-build | Allow build execution on pull_request_target events (unsafe) | no | false |
| fail-on-stderr | Fail build if stderr output is non-empty | no | false |
| dist-path | Output directory to scan. If omitted, auto-detection is used (e.g., dist, build, out, .next) | no | — |
| gzip | Calculate gzip sizes | no | true |
| brotli | Calculate brotli sizes | no | true |
| budget-max-increase-kb | Maximum allowed size increase in KB (e.g., 10 or 0.5) | no | — |
| warn-above-kb | Warn if any file grows more than this KB (e.g., 50) | no | — |
| fail-above-kb | Fail if any file grows more than this KB (e.g., 100) | no | — |
| comment-mode | When to comment: always, on-increase, never | no | always |
| fail-on-comment-error | Fail workflow if PR comment cannot be posted | no | false |
| skip-install | Skip dependency installation (use if already installed) | no | false |
| github-token | GitHub token for PR comments and artifact access | yes | — |
| max-artifact-pages | Maximum number of artifact pages to search (100 artifacts per page). Prevents long searches in repos with many artifacts. | no | 10 |
Outputs
| name | description |
|---|---|
| total-size | Total bundle size in bytes |
| total-gzip | Total gzip size in bytes |
| total-brotli | Total brotli size in bytes |
| diff-size | Size difference in bytes |
| diff-gzip | Gzip size difference in bytes |
| diff-brotli | Brotli size difference in bytes |
| status | Status: pass, fail, no-baseline, or baseline-updated |