Skip to content

chore: add screenshot pipeline workflow#17805

Merged
sfanahata merged 3 commits into
masterfrom
chore/add-screenshot-pipeline-workflow
May 19, 2026
Merged

chore: add screenshot pipeline workflow#17805
sfanahata merged 3 commits into
masterfrom
chore/add-screenshot-pipeline-workflow

Conversation

@sfanahata
Copy link
Copy Markdown
Contributor

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

  • Adds .github/workflows/screenshot-pipeline.yml
  • Weekly schedule (Monday 6am UTC) + manual trigger
  • Supports scope, dry_run, and threshold inputs
  • No impact on existing workflows or build process

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.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment May 19, 2026 6:39pm
sentry-docs Ready Ready Preview, Comment May 19, 2026 6:39pm

Request Review

Comment thread .github/workflows/screenshot-pipeline.yml
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread .github/workflows/screenshot-pipeline.yml Outdated
Comment thread .github/workflows/screenshot-pipeline.yml Outdated
Comment thread .github/workflows/screenshot-pipeline.yml Outdated
- 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
Comment thread .github/workflows/screenshot-pipeline.yml Outdated
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' }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

@sergical sergical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excited to test the real thing 👀

@sfanahata sfanahata merged commit 86bab1b into master May 19, 2026
21 checks passed
@sfanahata sfanahata deleted the chore/add-screenshot-pipeline-workflow branch May 19, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants