From f3ed1614c2fa90b8b1edbdce41688269ac599a42 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 2 Feb 2026 13:45:21 +0000 Subject: [PATCH] fix(ci): improve nightly build sync process by fetching both branches and preventing non-fast-forward errors --- .github/workflows/nightly-build.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index e1c58a1a..b97f1b7f 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -46,11 +46,16 @@ jobs: - name: Sync development to nightly id: sync run: | - # Fetch development branch + # Fetch both branches to ensure we have the latest remote state git fetch origin development + git fetch origin nightly - # Check if there are differences - if git diff --quiet nightly origin/development; then + # Sync local nightly with remote nightly to prevent non-fast-forward errors + echo "Syncing local nightly with remote nightly..." + git reset --hard origin/nightly + + # Check if there are differences between remote branches + if git diff --quiet origin/nightly origin/development; then echo "No changes to sync from development to nightly" echo "has_changes=false" >> $GITHUB_OUTPUT else