File tree Expand file tree Collapse file tree 2 files changed +14
-23
lines changed Expand file tree Collapse file tree 2 files changed +14
-23
lines changed Original file line number Diff line number Diff line change @@ -40,26 +40,21 @@ jobs:
40
40
restore-keys : |
41
41
${{ runner.os }}-maven
42
42
43
- - name : Maven operation with Sonar
43
+ - name : Regular Build
44
+ run : |
45
+ ./mvnw -B -U clean verify
46
+
47
+ - name : Sonar Analysis
44
48
if : matrix.sonar-enabled
45
49
run : |
46
- mvn -B -U -Pcoverage \
47
- clean verify \
48
- sonar:sonar \
50
+ ./mvnw -B -Pcoverage sonar:sonar \
49
51
-Dsonar.projectKey=AxonFramework_extension-kotlin \
50
52
-Dsonar.organization=axonframework \
51
53
-Dsonar.host.url=https://sonarcloud.io \
52
54
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
53
55
env :
54
56
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
57
56
- - name : Maven operation without Sonar
57
- if : matrix.sonar-enabled != true
58
- run : |
59
- mvn -B -U clean verify
60
- env :
61
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62
-
63
58
- name : Deploy to Sonatype
64
59
if : success()
65
60
run : |
Original file line number Diff line number Diff line change 14
14
sonar-enabled : false
15
15
- java-version : 11
16
16
sonar-enabled : true
17
+ fail-fast : false
17
18
18
19
steps :
19
20
- name : Checkout code
@@ -36,22 +37,17 @@ jobs:
36
37
restore-keys : |
37
38
${{ runner.os }}-maven
38
39
39
- - name : Maven operation with Sonar
40
- if : matrix.sonar-enabled
40
+ - name : Regular Build
41
41
run : |
42
- mvn -B -U -Pcoverage \
43
- clean verify \
44
- sonar:sonar \
42
+ ./mvnw -B -U clean verify
43
+
44
+ - name : Sonar Analysis
45
+ if : ${{ success() && matrix.sonar-enabled && github.event.pull_request.head.repo.full_name == github.repository }}
46
+ run : |
47
+ ./mvnw -B -Pcoverage sonar:sonar \
45
48
-Dsonar.projectKey=AxonFramework_extension-kotlin \
46
49
-Dsonar.organization=axonframework \
47
50
-Dsonar.host.url=https://sonarcloud.io \
48
51
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
49
52
env :
50
53
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
-
52
- - name : Maven operation without Sonar
53
- if : matrix.sonar-enabled != true
54
- run : |
55
- mvn -B -U clean verify
56
- env :
57
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments