File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010jobs :
1111 sonarcloud :
1212 runs-on : ubuntu-latest
13+ environment : org-prod
1314 permissions :
15+ id-token : write
1416 contents : read
1517 pull-requests : write
1618 steps :
1719 - uses : actions/checkout@v6
1820 with :
1921 fetch-depth : 0
2022
23+ - name : Azure login (OIDC)
24+ uses : azure/login@v2
25+ with :
26+ client-id : ${{ vars.AZURE_CLIENT_ID }}
27+ tenant-id : ${{ vars.AZURE_TENANT_ID }}
28+ subscription-id : ${{ vars.AZURE_SUBSCRIPTION_ID }}
29+
30+ - name : Read SonarCloud token from Key Vault
31+ shell : bash
32+ run : |
33+ SONAR_TOKEN="$(az keyvault secret show \
34+ --vault-name "${{ vars.AZURE_KEYVAULT_NAME }}" \
35+ --name "sonar-cloud-token" \
36+ --query value -o tsv)"
37+ echo "::add-mask::$SONAR_TOKEN"
38+ echo "SONAR_TOKEN=$SONAR_TOKEN" >> "$GITHUB_ENV"
39+
2140 - uses : actions/setup-python@v6
2241 with :
2342 python-version : ' 3.12'
3251 uses : SonarSource/sonarcloud-github-action@ffc3010689be73b8e5ae0c57ce35968afd7909e8
3352 env :
3453 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35- SONAR_TOKEN : ${{ secrets .SONAR_TOKEN }}
54+ SONAR_TOKEN : ${{ env .SONAR_TOKEN }}
3655 with :
3756 args : >
3857 -Dsonar.host.url=https://sonarcloud.io
4766 with :
4867 scanMetadataReportFile : dist/quality/sonar/scannerwork/report-task.txt
4968 env :
50- SONAR_TOKEN : ${{ secrets .SONAR_TOKEN }}
69+ SONAR_TOKEN : ${{ env .SONAR_TOKEN }}
5170 SONAR_HOST_URL : https://sonarcloud.io
5271 timeout-minutes : 5
You can’t perform that action at this time.
0 commit comments