Skip to content

Commit b3f0c6a

Browse files
committed
Forward SONAR env ...
1 parent 2936640 commit b3f0c6a

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/build-artifacts.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ on:
1010
required: false
1111
type: boolean
1212
default: false
13+
sonar-organization:
14+
required: false
15+
type: string
16+
default: ''
17+
sonar-project-key:
18+
required: false
19+
type: string
20+
default: ''
21+
sonar-token:
22+
required: false
23+
type: string
24+
default: ''
1325

1426
jobs:
1527
build:
@@ -61,6 +73,9 @@ jobs:
6173
if: ${{ inputs.run-sonar }}
6274
env:
6375
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
SONAR_ORGANIZATION: ${{ inputs.sonar-organization }}
77+
SONAR_PROJECT_KEY: ${{ inputs.sonar-project-key }}
78+
SONAR_TOKEN: ${{ inputs.sonar-token }}
6479
run: |
6580
./gradlew sonar -Psonar.branch.name=${GITHUB_REF#refs/heads/} --info --scan
6681

.github/workflows/gradle-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
# SonarQube requires JDK 17 or higher
2121
java-version: '17'
2222
run-sonar: true
23+
sonar-organization: ${{ env.SONAR_ORGANIZATION }}
24+
sonar-project-key: ${{ env.SONAR_PROJECT_KEY }}
25+
sonar-token: ${{ env.SONAR_TOKEN }}
2326

2427
post-build:
2528
needs: build-artifacts

0 commit comments

Comments
 (0)