Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#
# jobs:
# sonar:
# uses: usetheokit/shared-workflows/.github/workflows/sonar.yml@v1
# secrets: inherit
# uses: usetheokit/shared-workflows/.github/workflows/sonar.yml@v1 # zizmor: ignore[unpinned-uses]
# secrets:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# with:
# coverage-command: pnpm test:coverage
#
Expand Down Expand Up @@ -56,6 +57,16 @@ on:
description: 'Override when the repository does not install with a frozen pnpm lockfile.'
type: string
default: ''
secrets:
SONAR_TOKEN:
description: |
SonarCloud analysis token. Declared rather than inherited: `secrets: inherit` hands this
workflow EVERY secret the caller holds, and zizmor flags it for that reason. Naming the
one secret it needs is the difference between a scanner that can publish an analysis and
a scanner that could publish anything.

Optional, so a repository without the secret still runs the job — it warns and skips.
required: false

# One analysis per ref. Two scans of the same commit race for the same server-side report, and the
# loser overwrites the winner with an identical result — wasted minutes, and a confusing history.
Expand Down