nixos/github-runner: use state instead of runtime dir as RUNNER_ROOT

Using the runtime directory as `RUNNER_ROOT` is wrong. We should always
use the state directory like we already do when invoking the runner
configure script. Otherwise, the runner constructs the wrong path for
some files (.credentials, .runner, ...).
This commit is contained in:
Vincent Haupert 2022-07-19 13:00:15 +02:00 committed by Winter
parent eeb2bb2fef
commit 65542a6348

View file

@ -136,7 +136,7 @@ in
environment = {
HOME = runtimeDir;
RUNNER_ROOT = runtimeDir;
RUNNER_ROOT = stateDir;
};
path = (with pkgs; [
@ -213,7 +213,7 @@ in
echo "Configuring GitHub Actions Runner"
token=$(< "$STATE_DIRECTORY"/${newConfigTokenFilename})
RUNNER_ROOT="$STATE_DIRECTORY" ${cfg.package}/bin/config.sh \
${cfg.package}/bin/config.sh \
--unattended \
--disableupdate \
--work "$RUNTIME_DIRECTORY" \