From 1c74f35e7d0857bcea9501130c457969851a31dc Mon Sep 17 00:00:00 2001 From: Saeed Rezaee Date: Tue, 23 Jan 2024 09:46:38 +0100 Subject: [PATCH] Disable SonarCloud analysis on fork pull request Because the environment variables are not passed to the workflow created by a pull request from the fork: https://github.com/orgs/community/discussions/44322 Signed-off-by: Saeed Rezaee Signed-off-by: Diego Rondini --- .github/workflows/pipeline-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pipeline-build.yml b/.github/workflows/pipeline-build.yml index 1db31a4..d4a0b06 100644 --- a/.github/workflows/pipeline-build.yml +++ b/.github/workflows/pipeline-build.yml @@ -56,6 +56,8 @@ jobs: run: | if [[ "$RUNNER_OS" == "Windows" || ( "$RUNNER_OS" == "macOS" && ${{ github.event_name }} != 'pull_request' ) ]]; then ./gradlew build -x test + elif [[ ${{ github.event_name }} == 'pull_request' && ${{ github.event.pull_request.head.repo.full_name != 'eclipse/hara-ddiclient' }} ]]; then + ./gradlew --info build else ./gradlew --info build sonar fi