corralimited/SnapDiff Visual Test
Run visual regression tests with SnapDiff. Auto-discovers your preview URL from GitHub deployments — works with Vercel, Netlify, Cloudflare Pages, and any host that writes deployment statuses.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit May 14, 2026
- License
- MIT
Pinned Snippet
uses: corralimited/snapdiff-action@60f68205af87162b90a5da482dfc499cff707983 # v1.2.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| api-key | SnapDiff API key (sd_live_xxx or sd_test_xxx) | yes | — |
| project | Project slug or ID | yes | — |
| pages | Pages to test, one per line in "name=path" or "name=url" format. Paths (starting with /) are resolved against the auto-discovered preview/production URL. Full URLs are used as-is (skips auto-discovery for that page). Example: homepage=/ pricing=/pricing external=https://other-host.com/page | yes | — |
| api-url | SnapDiff API base URL | no | https://api.snapdiff.ai |
| preview-url | Override auto-discovery with an explicit base URL (e.g. https://staging.myapp.com). Use this if your host does not write GitHub deployment statuses. | no | "" |
| extra-headers | HTTP headers applied to every page capture, one per line as `Key: value`. Use to authenticate against protected previews (Vercel Protection Bypass, Cloudflare Access, basic auth, etc.). Header values are sent only on the capture request and never persisted in SnapDiff. | no | "" |
| preview-environment | Substring filter to match the GitHub deployment environment name (case-insensitive). Defaults to "preview" on pull_request events, "production" otherwise. Set to e.g. "staging" or your Vercel project alias if you have multiple environments per SHA. | no | "" |
| preview-timeout | Maximum minutes to wait for the preview deployment to become available | no | 10 |
| viewport-width | Viewport width in CSS pixels | no | 1280 |
| viewport-height | Viewport height in CSS pixels | no | 720 |
| full-page | Capture the entire scrollable page instead of just the viewport | no | false |
| github-token | Token used to read deployment statuses. Defaults to the workflow GITHUB_TOKEN. | no | ${{ github.token }} |
| wait | Wait for the build to finish diffing and report results | no | true |
| wait-timeout | Maximum minutes to wait for build completion | no | 5 |
Outputs
| name | description |
|---|---|
| build-id | The SnapDiff build ID |
| status | Build status (approved, changes_requested, failed) |
| changed-count | Number of pages with visual changes |
| review-url | URL to review the build in the SnapDiff dashboard |
| preview-url | The base URL that was discovered (or the explicit preview-url input) |