From 2f747a274fdaef0e0453c8968849c67345c010a0 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 24 Oct 2024 13:54:19 +0200 Subject: [PATCH] ci: trigger ci runs from upstream fix --- .github/helper/install.sh | 11 +++++++++-- .github/workflows/patch.yml | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 915a4637999..a7ab4a662a7 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -12,9 +12,16 @@ pip install frappe-bench githubbranch=${GITHUB_BASE_REF:-${GITHUB_REF##*/}} frappeuser=${FRAPPE_USER:-"frappe"} -frappebranch=${FRAPPE_BRANCH:-$githubbranch} +frappecommitish=${FRAPPE_BRANCH:-$githubbranch} + +mkdir frappe +pushd frappe +git init +git remote add origin "https://github.com/${frappeuser}/frappe" +git fetch origin "${frappecommitish}" --depth 1 +git checkout FETCH_HEAD +popd -git clone "https://github.com/${frappeuser}/frappe" --branch "${frappebranch}" --depth 1 bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench mkdir ~/frappe-bench/sites/test_site diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index deca0073b89..f9a79d86c04 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -137,7 +137,8 @@ jobs: update_to_version 15 echo "Updating to latest version" - git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" + git -C "apps/frappe" fetch --depth 1 upstream "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" + git -C "apps/frappe" checkout -q -f FETCH_HEAD git -C "apps/erpnext" checkout -q -f "$GITHUB_SHA" pgrep honcho | xargs kill