Skip to main content

GitHub Action (planned)

Not published yet. The ScanU GitHub Action is planned and cannot be installed. Its GitHub namespace is not under ScanU's control yet, so the workflows below are a reference for its planned inputs only: they have no uses: line and cannot run. Do not point a workflow at any scanu-action repository; it would receive your SCANU_TOKEN. To check pull requests today, use the REST workflow in the Quick Start.

1) Repository secrets

In GitHub: Settings → Secrets and variables → Actions.

  • SCANU_TOKEN = API token from ScanU dashboard.
  • SCANU_PROJECT_ID = your ScanU project UUID.
  • SCANU_API_BASE_URL (optional) = custom API URL.

2) Planned workflow file

Minimal (reference only):

yaml
name: Visual checks
on:
  pull_request:

jobs:
  visual-regression:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
      issues: write
    steps:
      - uses: actions/checkout@v4

      - name: Run ScanU
        # uses: <ScanU GitHub Action — not published yet>
        with:
          token: ${{ secrets.SCANU_TOKEN }}
          project_id: ${{ secrets.SCANU_PROJECT_ID }}
          urls: |
            https://staging.example.com

PR + main branch + browser/device matrix (reference only):

yaml
name: ScanU visual regression
on:
  pull_request:
  push:
    branches: [main]

jobs:
  visual-regression:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    permissions:
      contents: read
      pull-requests: write
      issues: write

    strategy:
      fail-fast: false
      matrix:
        browser: [chromium, firefox]
        device: [desktop-fhd, iphone-15]

    steps:
      - uses: actions/checkout@v4

      - name: Run ScanU
        # uses: <ScanU GitHub Action — not published yet>
        with:
          token: ${{ secrets.SCANU_TOKEN }}
          project_id: ${{ secrets.SCANU_PROJECT_ID }}
          api_base_url: ${{ secrets.SCANU_API_BASE_URL }}
          urls: |
            https://staging.example.com
            https://staging.example.com/pricing
          browsers: ${{ matrix.browser }}
          devices: ${{ matrix.device }}
          fail_on_diff: true
          timeout: 20