From e188b24383f844455a9aab72b6c48e7e70cadb46 Mon Sep 17 00:00:00 2001 From: Nelson Nobre Date: Sat, 26 Sep 2026 10:17:59 +0100 Subject: [PATCH] ci: update sonar project key to use environment variable --- .github/workflows/sonarcloud-and-mutations.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud-and-mutations.yml b/.github/workflows/sonarcloud-and-mutations.yml index e607ccd..7519786 100644 --- a/.github/workflows/sonarcloud-and-mutations.yml +++ b/.github/workflows/sonarcloud-and-mutations.yml @@ -31,6 +31,7 @@ env: NUGET_XMLDOC_MODE: skip # Disable NuGet XML documentation generation SONAR_ORGANIZATION: 'technobre' + SONAR_PROJECT_KEY: 'PowerUtils.Geolocation' permissions: {} @@ -152,10 +153,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }} run: | ./.sonar/scanner/dotnet-sonarscanner begin \ - /k:"$SONAR_PROJECT_KEY" \ + /k:"${{ env.SONAR_PROJECT_KEY }}" \ /o:"${{ env.SONAR_ORGANIZATION }}" \ /d:sonar.token="$SONAR_TOKEN" \ /d:sonar.host.url="https://sonarcloud.io" \