From e4d9667beddbde196348ad9f24f91052df48b40c 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..afe294cab1 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: