File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2424 cmd : install # will run `yarn install` command
2525 - name : Run npm test:ci
2626 run : CHROMIUM_BIN=$(which chrome) npm run test:ci # will run `test:ci` command
27- - uses : SonarSource/sonarcloud-github-action@master
27+ - name : Run SonarCloud with organzation and project key from environment
28+ uses : SonarSource/sonarcloud-github-action@master
29+ if : ${{ env.SONAR_ORGANIZATION != '' && env.SONAR_PROJECT_KEY != '' }}
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
32+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
33+ with :
34+ args : >
35+ -Dsonar.organization=${{ env.SONAR_ORGANIZATION }}
36+ -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
37+ - name : Run SonarCloud with hardcoded organization and project key
38+ uses : SonarSource/sonarcloud-github-action@master # Fallback for the catenax-ng/product-traceability-foss-frontend
39+ if : ${{ env.SONAR_ORGANIZATION == '' || env.SONAR_PROJECT_KEY == '' }}
2840 env :
2941 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3042 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments