From 7ea93a640e366f953cae2170ccfa1bf9d59221f7 Mon Sep 17 00:00:00 2001 From: agessaman Date: Fri, 24 Jul 2026 20:04:31 -0700 Subject: [PATCH] ci: rebase with --autostash on the flasher push retry A plain `git rebase` refuses to run when the checkout has unstaged changes, so the retry path could fail instead of retrying. The beta workflow stages a scoped subset on purpose (production's files must never ride along), which leaves the rest of the checkout dirty and hits this exactly; keep all three flasher pushes identical so it cannot resurface here either. Unstaged content stays unstaged, so nothing extra gets published. --- .github/workflows/build-observer-firmwares.yml | 4 +++- .github/workflows/sync-flasher-content.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-observer-firmwares.yml b/.github/workflows/build-observer-firmwares.yml index fb366277..35514591 100644 --- a/.github/workflows/build-observer-firmwares.yml +++ b/.github/workflows/build-observer-firmwares.yml @@ -320,7 +320,9 @@ jobs: fi echo "push rejected (attempt $attempt); rebasing onto origin/$br" git fetch origin "$br" - git rebase "origin/$br" || { + # --autostash so a dirty tree can never make the rebase refuse to run; + # nothing unstaged gets published either way. + git rebase --autostash "origin/$br" || { git rebase --abort || true echo "::error::flasher rebase conflicted; re-run this workflow to republish" exit 1 diff --git a/.github/workflows/sync-flasher-content.yml b/.github/workflows/sync-flasher-content.yml index a5685a9c..93ef1b34 100644 --- a/.github/workflows/sync-flasher-content.yml +++ b/.github/workflows/sync-flasher-content.yml @@ -86,7 +86,9 @@ jobs: fi echo "push rejected (attempt $attempt); rebasing onto origin/$br" git fetch origin "$br" - git rebase "origin/$br" || { + # --autostash so a dirty tree can never make the rebase refuse to run; + # nothing unstaged gets published either way. + git rebase --autostash "origin/$br" || { git rebase --abort || true echo "::error::flasher rebase conflicted; re-run this workflow to resync" exit 1