chore: add screenshot pipeline workflow#17805
Conversation
Adds the GitHub Actions workflow file so it can be triggered via workflow_dispatch. The pipeline scripts and configuration live on the feature/playwright-screenshot-pipeline branch.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6f5a695. Configure here.
- Fix shell injection: pass inputs.scope via env var instead of direct interpolation, with regex validation for safe directory paths - Fix shell injection: pass inputs.dry_run via env var - Add working-directory to all npx ts-node steps so they find deps - Use bash arrays for safe argument construction
| npx ts-node src/capture-and-diff.ts "${DRY_RUN_ARGS[@]}" | ||
| working-directory: scripts/screenshot-pipeline | ||
| env: | ||
| SENTRY_STORAGE_STATE_PATH: ${{ inputs.dry_run && '' || '/tmp/storageState.json' }} |
There was a problem hiding this comment.
Bug: The ternary expression ${{ inputs.dry_run && '' || '/tmp/storageState.json' }} always provides the file path, even during a dry run, causing an error.
Severity: MEDIUM
Suggested Fix
Invert the logic in the expression to correctly handle the dry-run case. The expression should be ${{ !inputs.dry_run && '/tmp/storageState.json' || '' }}. This ensures the path is only provided when not in dry-run mode.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: .github/workflows/screenshot-pipeline.yml#L95
Potential issue: The ternary expression `${{ inputs.dry_run && '' ||
'/tmp/storageState.json' }}` is intended to conditionally provide a file path. However,
due to how GitHub Actions evaluates expressions, where an empty string `''` is falsy,
the expression always resolves to `'/tmp/storageState.json'`. During a dry run, the file
is not created by a preceding step. This leads to a subsequent step attempting to read
the non-existent file, causing an `ENOENT` error and failing the workflow.
sergical
left a comment
There was a problem hiding this comment.
excited to test the real thing 👀

Summary
Adds the GitHub Actions workflow file for the automated screenshot pipeline so it can be triggered via
workflow_dispatch.This is a prerequisite for testing the pipeline end-to-end -- GitHub requires workflow files to exist on the default branch before they can be manually triggered.
The pipeline scripts and full configuration live on
feature/playwright-screenshot-pipeline. This PR only adds the workflow YAML.What it does
.github/workflows/screenshot-pipeline.ymlscope,dry_run, and threshold inputs