From 02e894d8dbf39f81456c7f740897b4bf4d05c269 Mon Sep 17 00:00:00 2001 From: Patrick Roza Date: Sat, 25 Jul 2026 07:32:19 +0200 Subject: [PATCH] Reuse fetched integration base for deploy scope --- .github/workflows/fork-ci.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/fork-ci.yml b/.github/workflows/fork-ci.yml index e3331ac6776..3588b71953a 100644 --- a/.github/workflows/fork-ci.yml +++ b/.github/workflows/fork-ci.yml @@ -167,16 +167,21 @@ jobs: PREVIOUS_SHA: ${{ steps.previous.outputs.sha }} run: | deploy=true - if [[ "${PREVIOUS_SHA}" =~ ^[0-9a-f]{40}$ ]] && - git fetch --quiet origin "${PREVIOUS_SHA}" && - git cat-file -e "${PREVIOUS_SHA}^{commit}"; then - deploy="$( - scripts/classify-deployment-diff.sh "${PREVIOUS_SHA}" "${GITHUB_SHA}" | - tee /dev/stderr | - sed -n 's/^deploy=//p' - )" + if [[ "${PREVIOUS_SHA}" =~ ^[0-9a-f]{40}$ ]]; then + if ! git cat-file -e "${PREVIOUS_SHA}^{commit}" 2>/dev/null; then + git fetch --quiet origin "${PREVIOUS_SHA}" || true + fi + if git cat-file -e "${PREVIOUS_SHA}^{commit}" 2>/dev/null; then + deploy="$( + scripts/classify-deployment-diff.sh "${PREVIOUS_SHA}" "${GITHUB_SHA}" | + tee /dev/stderr | + sed -n 's/^deploy=//p' + )" + else + echo "Previous successful integration SHA is unavailable; deployment remains enabled." + fi else - echo "No fetchable previous successful integration SHA; deployment remains enabled." + echo "No previous successful integration SHA; deployment remains enabled." fi echo "deploy=${deploy}" >>"${GITHUB_OUTPUT}"