From 73584ff24fd3af2717a3f2b679e942dd02f1c4f6 Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Sat, 16 Sep 2023 12:15:43 +0530 Subject: [PATCH] Update gradle.yml --- .github/workflows/gradle.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9044a560c4..bbade0be8b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -30,7 +30,11 @@ jobs: - name: Extract branch name if: success() id: extract_branch - run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT + run: | + if [$GITHUB_EVENT_NAME == 'pull_request']; then + echo "value=${GITHUB_BASE_REF:11}" >> $GITHUB_OUTPUT + else + echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT - name: Build Documentation uses: gradle/gradle-build-action@v2 with: