Skip to content

Commit

Permalink
Update actions-runner service
Browse files Browse the repository at this point in the history
Signed-off-by: ApplBoy <[email protected]>
  • Loading branch information
ApplBoy committed Jan 27, 2025
1 parent e704166 commit 3a4b259
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions services/systemd/actions-runner/actions-runner.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ After=network.target

[Service]
User=${USER}
WorkingDirectory=${HOME}/actions-runner
ExecStart=${HOME}/actions-runner/run.sh
WorkingDirectory=${PROJECT_DIR}/actions-runner
ExecStart=bash ${PROJECT_DIR}/actions-runner/run.sh
Restart=always
RestartSec=10
Environment=PATH=/usr/bin:/usr/local/bin:${HOME}/actions-runner
Environment=PATH=/usr/bin:/usr/local/bin:${PROJECT_DIR}/actions-runner
Environment=HOME=${HOME}
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
Expand Down
2 changes: 2 additions & 0 deletions services/systemd/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function parse_service_file() {
file_dir=$(dirname "$file_path")
temp_file="${file_dir}/.temp_$(basename "$file_path")"

project_dir=$(realpath "$script_dir/..")
export PROJECT_DIR="$project_dir"
envsubst <"$file_path" >"$temp_file"
}

Expand Down

0 comments on commit 3a4b259

Please sign in to comment.