diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9044a560c4..2f3b5bfd2f 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -30,7 +30,12 @@ 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 + fi - name: Build Documentation uses: gradle/gradle-build-action@v2 with: