Fix host-mode checkout in Gitea workflow
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user