From 23821e1be6b26b419d0b594cc11dc8b6282c13a3 Mon Sep 17 00:00:00 2001 From: NeilClack Date: Fri, 7 Aug 2026 15:21:47 -0500 Subject: [PATCH] Fix host-mode checkout in Gitea workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace actions/checkout@v4 with a manual token-based clone — its files were being copied into the act_runner workspace instead of the repo, leaving nix to evaluate the wrong flake. Add a workspace inspection step before the build to aid diagnosis. --- .gitea/workflows/build.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5fb567e..d9925dc 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -9,7 +9,24 @@ jobs: nix-build: runs-on: build-server steps: - - uses: actions/checkout@v4 + # actions/checkout@v4 is unreliable on host-mode runners (its files are + # copied into the workspace instead of the repo), so clone explicitly. + - name: Checkout + run: | + rm -rf ./* ./.[!.]* 2>/dev/null || true + git config --global http.extraheader "Authorization: token ${{ github.token }}" + git clone --depth 1 --branch "${{ gitea.ref_name }}" \ + "${{ gitea.server_url }}/${{ gitea.repository }}.git" . + test -f flake.nix + git log --oneline -1 + + - name: Inspect workspace + run: | + pwd + ls -la + git rev-parse --show-toplevel 2>&1 || true + git remote -v 2>&1 || true + test -f flake.nix && echo "flake.nix present" || echo "NO flake.nix" - name: Build + offline test suite run: nix build -L .#checks.default