File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 10
10
steps :
11
11
- name : Checkout
12
12
uses : actions/checkout@v3
13
+ with :
14
+ fetch-depth : 0 # For Sonar blame information
13
15
14
16
- name : Set up Java
15
17
uses : actions/setup-java@v3
@@ -30,14 +32,13 @@ jobs:
30
32
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
31
33
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
32
34
run : |
33
- # Replace '/' with '_' to get project key
34
- PROJECT_KEY=${${{ github.repository }}//\//_}
35
+ REPO_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
35
36
36
- mvn verify -B -P prod "-Dstyle.color=always" \
37
+ mvn verify -B -P prod,coverage "-Dstyle.color=always" \
37
38
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
38
39
-Dsonar.host.url="https://sonarcloud.io" \
39
- -Dsonar.organization=${{ github.repository_owner }} \
40
- -Dsonar.projectKey=$PROJECT_KEY
40
+ -Dsonar.organization=soat-tech-challenge \
41
+ -Dsonar.projectKey=soat-tech-challenge_$REPO_NAME
41
42
42
43
- name : Build and push
43
44
uses : docker/build-push-action@v5
You can’t perform that action at this time.
0 commit comments