ci: report sonar branch name
This commit is contained in:
parent
c486f45bc0
commit
4c255a8258
1 changed files with 2 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ jobs:
|
|||
run: |
|
||||
WORKDIR=${GITHUB_WORKSPACE:-$PWD}
|
||||
HOST_URL=${SONAR_HOST_URL:?SONAR_HOST_URL secret not set}
|
||||
BRANCH_NAME=${GITHUB_REF#refs/heads/}
|
||||
PROJECT_KEY=${SONAR_PROJECT_KEY:-}
|
||||
if [ -z "$PROJECT_KEY" ] && [ -f sonar-project.properties ]; then
|
||||
PROJECT_KEY=$(grep -E '^sonar.projectKey=' sonar-project.properties | cut -d= -f2 | tr -d '\r')
|
||||
|
|
@ -64,6 +65,7 @@ jobs:
|
|||
-Dsonar.host.url="$HOST_URL" \
|
||||
-Dsonar.token="$SONAR_TOKEN" \
|
||||
-Dsonar.projectKey="$PROJECT_KEY" \
|
||||
-Dsonar.branch.name="$BRANCH_NAME" \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.scm.disabled=true \
|
||||
-Dsonar.projectBaseDir="$WORKDIR"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue