File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ jobs:
24
24
java-version : 11
25
25
distribution : ' temurin'
26
26
- name : SonarCloud Scan on PR
27
- if : github.event.workflow_run.pull_requests[0] != null
27
+ if : github.event.workflow_run.event == 'pull_request'
28
28
run : ./gradlew check sonarqube -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} -Dsonar.pullrequest.key=${{ github.event.workflow_run.pull_requests[0].number }} -Dsonar.pullrequest.branch=${{ github.event.workflow_run.pull_requests[0].head.ref }} -Dsonar.pullrequest.base=${{ github.event.workflow_run.pull_requests[0].base.ref }}
29
29
env :
30
30
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
31
31
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
32
- name : SonarCloud Scan on push
33
- if : github.event.workflow_run.pull_requests[0] == null && github.event.workflow_run.head_repository.full_name == github.event.repository.full_name
33
+ if : github.event.workflow_run.event == 'push' && github.event.workflow_run.head_repository.full_name == github.event.repository.full_name
34
34
run : ./gradlew check sonarqube -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} -Dsonar.branch.name=${{ github.event.workflow_run.head_branch }}
35
35
env :
36
36
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments