Skip to content

Commit ca5f381

Browse files
Rollback SonarQube step
1 parent bc95916 commit ca5f381

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,42 @@ jobs:
4040

4141
- name: Set VERSION env
4242
run: echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
43+
44+
- name: SonarQube Scan (Push)
45+
if: github.event_name == 'push'
46+
uses: SonarSource/sonarqube-scan-action@v7
47+
env:
48+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
projectBaseDir: .
52+
args: >
53+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
54+
-Dsonar.projectVersion=${{ env.VERSION }}
55+
56+
- name: SonarQube Scan (Push)
57+
if: github.event_name == 'push'
58+
uses: SonarSource/sonarqube-scan-action@v7
59+
env:
60+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
projectBaseDir: .
64+
args: >
65+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
66+
-Dsonar.projectVersion=${{ env.VERSION }}
67+
68+
- name: SonarQube Scan (Pull Request)
69+
if: github.event_name == 'pull_request'
70+
uses: SonarSource/sonarqube-scan-action@v7
71+
env:
72+
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
with:
75+
projectBaseDir: .
76+
args: >
77+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
78+
-Dsonar.projectVersion=${{ env.VERSION }}
79+
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
80+
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
81+
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}

0 commit comments

Comments
 (0)