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:
parent
eeb2bb2fef
commit
65542a6348
|
@ -136,7 +136,7 @@ in
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
HOME = runtimeDir;
|
HOME = runtimeDir;
|
||||||
RUNNER_ROOT = runtimeDir;
|
RUNNER_ROOT = stateDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
path = (with pkgs; [
|
path = (with pkgs; [
|
||||||
|
@ -213,7 +213,7 @@ in
|
||||||
echo "Configuring GitHub Actions Runner"
|
echo "Configuring GitHub Actions Runner"
|
||||||
|
|
||||||
token=$(< "$STATE_DIRECTORY"/${newConfigTokenFilename})
|
token=$(< "$STATE_DIRECTORY"/${newConfigTokenFilename})
|
||||||
RUNNER_ROOT="$STATE_DIRECTORY" ${cfg.package}/bin/config.sh \
|
${cfg.package}/bin/config.sh \
|
||||||
--unattended \
|
--unattended \
|
||||||
--disableupdate \
|
--disableupdate \
|
||||||
--work "$RUNTIME_DIRECTORY" \
|
--work "$RUNTIME_DIRECTORY" \
|
||||||
|
|
Loading…
Reference in a new issue