8.nix-darwin/modules/services/github-runner
Louis Opter a58dd30d2b
github-runner: canonicalizes workDir to fix actions/checkout@v6
We ran into this issue wherein GitHub's `actions/checkout` would fail
because `git-config` would fail to include additional configuration.

The symptom was:

```
Error: fatal: could not read Username for 'https://github.com': terminal prompts disabled
```

And is caused by `git config --local includeIf.gitdir:/var/lib/github-runners/_work/…`.

Wherein `git` apparently resolves (canonicalizes) the current repository
path which then does not match the argument for `includeIf.gitdir` which
then means the configuration that `actions/checkout` is trying to apply
does not get pulled in, which then prevents git from authenticating with
GitHub and fails the build.

Ngl, gemini 3 found that out for me.

We could prefix `/private` everywhere, but changing the user's home
directory is going to [be tricky], not sure what do to about that.

[be tricky]: 7e22bf538a/modules/users/default.nix (L208)
2025-12-12 20:52:37 +00:00
..
default.nix github-runners: adapt to NixOS module 2024-02-28 09:40:25 +01:00
options.nix github-runner: add support for node24 2025-08-18 16:45:51 +02:00
service.nix github-runner: canonicalizes workDir to fix actions/checkout@v6 2025-12-12 20:52:37 +00:00