Skip to content

Commit 89e6ec1

Browse files
authored
NUTCH-3085 Augment CI by adding code coverage and code quality reporting (#900)
1 parent 9f3bb41 commit 89e6ec1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/sonarcloud.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ jobs:
6464
- name: Resolve PR number
6565
id: pr
6666
run: |
67+
if [ "${{ github.event.workflow_run.event }}" != "pull_request" ]; then
68+
echo "is_pr=false" >> "$GITHUB_OUTPUT"
69+
exit 0
70+
fi
6771
PR_NUMBER=$(gh api \
6872
"repos/${{ github.repository }}/commits/${{ github.event.workflow_run.head_sha }}/pulls" \
6973
--jq '.[0].number // empty')
@@ -82,7 +86,7 @@ jobs:
8286
args: >
8387
-Dsonar.pullrequest.key=${{ steps.pr.outputs.number }}
8488
-Dsonar.pullrequest.branch=${{ github.event.workflow_run.head_branch }}
85-
-Dsonar.pullrequest.base=${{ github.event.workflow_run.event == 'pull_request' && 'master' || 'master' }}
89+
-Dsonar.pullrequest.base=master
8690
env:
8791
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8892
SONAR_HOST_URL: https://sonarcloud.io

0 commit comments

Comments
 (0)