ci: get branch name from GITHUB_REF if GITHUB_BASE_REF not available (#24913)

diff --git a/.github/helper/install.sh b/.github/helper/install.sh
index 253ad70..7b0f944 100644
--- a/.github/helper/install.sh
+++ b/.github/helper/install.sh
@@ -12,7 +12,7 @@
 
 pip install frappe-bench
 
-git clone https://github.com/frappe/frappe --branch "${GITHUB_BASE_REF}" --depth 1
+git clone https://github.com/frappe/frappe --branch "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" --depth 1
 bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench
 
 mkdir ~/frappe-bench/sites/test_site
@@ -43,4 +43,4 @@
 
 bench get-app erpnext "${GITHUB_WORKSPACE}"
 bench start &
-bench --site test_site reinstall --yes
\ No newline at end of file
+bench --site test_site reinstall --yes