Skip to content

Commit 9fbabd3

Browse files
Move SonarQube host URL from secrets to vars
1 parent ca5f381 commit 9fbabd3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,25 @@ jobs:
5858
uses: SonarSource/sonarqube-scan-action@v7
5959
env:
6060
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
61+
SONAR_HOST_URL: ${{ vars.SONARQUBE_HOST }}
6162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6263
with:
6364
projectBaseDir: .
6465
args: >
65-
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
66+
-Dsonar.host.url=${{ env.SONAR_HOST_URL }}
6667
-Dsonar.projectVersion=${{ env.VERSION }}
6768
6869
- name: SonarQube Scan (Pull Request)
6970
if: github.event_name == 'pull_request'
7071
uses: SonarSource/sonarqube-scan-action@v7
7172
env:
7273
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
74+
SONAR_HOST_URL: ${{ vars.SONARQUBE_HOST }}
7375
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7476
with:
7577
projectBaseDir: .
7678
args: >
77-
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
79+
-Dsonar.host.url=${{ env.SONAR_HOST_URL }}
7880
-Dsonar.projectVersion=${{ env.VERSION }}
7981
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
8082
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}

0 commit comments

Comments
 (0)