name: browser-pass
# OPT-IN: copy to .github/workflows/browser-pass.yml, edit the dev URL, and replace
# {{BROWSER_PASS_SHA}} with a reviewed 40-character Hub commit containing browser-pass.yml.
# Never add PR, push, merge_group or gate callers. Not installed by bootstrap/propagation.
on:
  workflow_dispatch:
    inputs:
      base-url:
        description: Dev URL to exercise
        required: true
        type: string
        default: https://dev.<app>.mutmut.work
      spec:
        description: Space-separated Playwright spec filters (empty runs all tests)
        type: string
        default: ''
      grep:
        description: Playwright title regex
        type: string
        default: ''

concurrency:
  group: browser-pass
  cancel-in-progress: false

permissions:
  contents: read
  packages: read # #8363: npm ci of @mutmutco/* packages in the reusable's setup.
  id-token: write # Required by the reusable's optional dev vault-env step.

jobs:
  browser-pass:
    uses: mutmutco/MMI-Hub/.github/workflows/browser-pass.yml@{{BROWSER_PASS_SHA}}
    with:
      base-url: ${{ inputs.base-url }}
      spec: ${{ inputs.spec }}
      grep: ${{ inputs.grep }}
