From 18250e7d0fd334af6674eccea0e117a684ef9359 Mon Sep 17 00:00:00 2001 From: Ned Wolpert Date: Sat, 13 Jun 2026 06:58:48 -0700 Subject: [PATCH] ci: add workflow_dispatch so the browser SonarQube scan can be run on demand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CI workflow only triggered on push/PR to main, so there was no way to re-run the browser-SDK SonarQube scan without pushing a commit (e.g. to test a SonarCloud project/setting change). Add a workflow_dispatch trigger (`gh workflow run ci.yml --ref main`) and extend the SonarQube step's guard to fire on manual runs too — otherwise the existing push/same-repo-PR condition would skip the scan on a dispatch run. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b1b015..b914e0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,9 @@ name: CI on: + # Manual on-demand runs (e.g. to re-trigger the browser-SDK SonarQube scan + # against a chosen ref without pushing a commit): gh workflow run ci.yml --ref main + workflow_dispatch: push: branches: [ "main" ] pull_request: @@ -79,7 +82,8 @@ jobs: # JavaScript/browser-SDK static analysis only. SonarQube was dropped for the JVM modules # (ADR 0018, native JaCoCo gates) but retained here for the TypeScript SDK. # SONAR_TOKEN is unavailable to PRs from forks; skip there to avoid a hard failure. - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository + # Manual (workflow_dispatch) and push runs always have the secret available. + if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository uses: sonarsource/sonarqube-scan-action@713881670b6b3676cda39549040e2d88c70d582e # v8.2.0 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}