From d88e37ad66c22d89c6bb16dde2929582b50a17e7 Mon Sep 17 00:00:00 2001 From: Chinmay Chaudhari Date: Sun, 23 Aug 2026 15:30:45 +0530 Subject: [PATCH] fix: deploy job no longer fails its own post steps after the branch switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run 32625812211 deployed successfully — every step green, APK pushed, Pages rebuilt — and was still marked failed. The only failure was the post step of the setup-rust-android composite action: the runner resolves a local action's action.yml from the workspace at job end, but by then the job has switched the work tree to the deploy branch, which does not carry .github/actions/. The same error was present in run 32580483451 underneath the missing-script failure, so every deploy since the branch-switch design will end red on this regardless of how well the deploy went. A final always() step now restores .github/ from the app commit that was checked out at the start (its objects are local, so this works on the orphan branch too). It runs after the push, so nothing restored can leak into the deployed tree, and it runs on genuine failures as well — keeping the real error the only one the run reports. --- .github/workflows/nightlydepolyci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/nightlydepolyci.yml b/.github/workflows/nightlydepolyci.yml index 4a2508e8..e5260ac6 100644 --- a/.github/workflows/nightlydepolyci.yml +++ b/.github/workflows/nightlydepolyci.yml @@ -192,3 +192,16 @@ jobs: # Force push this new state to overwrite fdroid-repo git push origin temp_deploy_branch:fdroid-repo --force + + # Step 12: put the local action definitions back. This job switches the + # work tree to the deploy branch, which does not carry .github/actions/ — + # and post-job steps of composite actions (rust-cache's save) resolve + # their action.yml from the workspace at job END. Without this, every + # run since the branch switch was added has ended "failure" on the post + # step even when the deploy itself fully succeeded — a red X that reads + # as a broken deploy but means nothing. `always()` so it also runs when + # a step after the switch genuinely failed, keeping the real error the + # only one reported. + - name: Restore local action definitions for post-job steps + if: always() + run: git checkout ${{ github.sha }} -- .github/ || true