Skip to content

Commit 9396211

Browse files
authored
Update qa.yml
1 parent 1cc947a commit 9396211

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/qa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
java-version: 11
2525
distribution: 'temurin'
2626
- name: SonarCloud Scan on PR
27-
if: github.event.workflow_run.pull_requests[0] != null
27+
if: github.event.workflow_run.event == 'pull_request'
2828
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 }}
2929
env:
3030
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
- 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
3434
run: ./gradlew check sonarqube -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} -Dsonar.branch.name=${{ github.event.workflow_run.head_branch }}
3535
env:
3636
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)