mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-03-09 12:48:12 +00:00
add github actions runner
This commit is contained in:
@@ -12,10 +12,21 @@ network_check
|
||||
update_os
|
||||
|
||||
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Creating runner user (no sudo)"
|
||||
if ! getent passwd runner >/dev/null 2>&1; then
|
||||
useradd -m -s /bin/bash runner
|
||||
fi
|
||||
msg_ok "Runner user ready"
|
||||
|
||||
fetch_and_deploy_gh_release "actions-runner" "actions/runner" "prebuild" "latest" "/opt/actions-runner" "actions-runner-linux-x64-*.tar.gz"
|
||||
|
||||
msg_info "Setting ownership for runner user"
|
||||
chown -R runner:runner /opt/actions-runner
|
||||
msg_ok "Ownership set"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/actions-runner.service
|
||||
[Unit]
|
||||
@@ -26,7 +37,7 @@ Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
User=runner
|
||||
WorkingDirectory=/opt/actions-runner
|
||||
ExecStart=/opt/actions-runner/run.sh
|
||||
Restart=on-failure
|
||||
@@ -38,6 +49,7 @@ EOF
|
||||
systemctl enable -q actions-runner
|
||||
msg_ok "Created Service"
|
||||
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
|
||||
Reference in New Issue
Block a user