From b2cac326290c6862fc7f86e4b2d920bd6e9a9bd6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:29:53 +0000 Subject: [PATCH] Fix: Skip deletion of main branch in release pipeline Add conditional check to prevent attempting to delete the main branch when promoting, as GitHub does not allow deletion of the default branch remotely. This resolves the workflow failure in the 'Promote and delete source' step. Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- .github/workflows/release_pipeline.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_pipeline.yml b/.github/workflows/release_pipeline.yml index d25c2cb..52ec397 100644 --- a/.github/workflows/release_pipeline.yml +++ b/.github/workflows/release_pipeline.yml @@ -314,7 +314,11 @@ jobs: git checkout -B "${DST}" "origin/${SRC}" git push origin "${DST}" - git push origin --delete "${SRC}" + + # Skip deletion of main branch as GitHub does not allow deleting the default branch + if [ "${SRC}" != "main" ]; then + git push origin --delete "${SRC}" + fi { echo "### Promotion report"