2020 with :
2121 fetch-depth : 0
2222
23+ - uses : actions/setup-python@v6
24+ with :
25+ python-version : ' 3.12'
26+
27+ - name : Install dependencies
28+ run : make install-dev
29+
30+ - name : Run tests with coverage
31+ run : make coverage-sonar
32+
2333 - name : Azure login (OIDC)
2434 uses : azure/login@v2
2535 with :
2838 subscription-id : ${{ vars.AZURE_SUBSCRIPTION_ID }}
2939
3040 - name : Read SonarCloud token from Key Vault
41+ id : sonar_token
3142 shell : bash
3243 run : |
3344 SONAR_TOKEN="$(az keyvault secret show \
@@ -39,23 +50,13 @@ jobs:
3950 exit 1
4051 fi
4152 echo "::add-mask::$SONAR_TOKEN"
42- echo "SONAR_TOKEN=$SONAR_TOKEN" >> "$GITHUB_ENV"
43-
44- - uses : actions/setup-python@v6
45- with :
46- python-version : ' 3.12'
47-
48- - name : Install dependencies
49- run : make install-dev
50-
51- - name : Run tests with coverage
52- run : make coverage-sonar
53+ echo "value=$SONAR_TOKEN" >> "$GITHUB_OUTPUT"
5354
5455 - name : SonarCloud scan
5556 uses : SonarSource/sonarcloud-github-action@ffc3010689be73b8e5ae0c57ce35968afd7909e8
5657 env :
5758 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58- SONAR_TOKEN : ${{ env.SONAR_TOKEN }}
59+ SONAR_TOKEN : ${{ steps.sonar_token.outputs.value }}
5960 with :
6061 args : >
6162 -Dsonar.host.url=https://sonarcloud.io
7071 with :
7172 scanMetadataReportFile : dist/quality/sonar/scannerwork/report-task.txt
7273 env :
73- SONAR_TOKEN : ${{ env.SONAR_TOKEN }}
74+ SONAR_TOKEN : ${{ steps.sonar_token.outputs.value }}
7475 SONAR_HOST_URL : https://sonarcloud.io
7576 timeout-minutes : 5
0 commit comments