From b0bfbf55136e3d2dd321160abb8f268d9e9ccb74 Mon Sep 17 00:00:00 2001 From: mahee96 <47920326+mahee96@users.noreply.github.com> Date: Tue, 24 Feb 2026 07:12:56 +0530 Subject: [PATCH] CI: improve more ci worflow --- scripts/ci/workflow.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/ci/workflow.py b/scripts/ci/workflow.py index 14d532e3..f1203eb3 100644 --- a/scripts/ci/workflow.py +++ b/scripts/ci/workflow.py @@ -316,6 +316,12 @@ def deploy(repo, source_json, release_tag, short_commit, marketing_version, vers run("git config user.name 'GitHub Actions'", check=False) run("git config user.email 'github-actions@github.com'", check=False) + # ------------------------------------------------------ + run("git fetch origin main", check=False, cwd=repo) + run("git switch main || git switch -c main origin/main", cwd=repo) + run("git reset --hard origin/main", cwd=repo) + # ------------------------------------------------------ + max_attempts = 5 for attempt in range(1, max_attempts + 1): if attempt > 1: