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:
@@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user