apt update && apt install -y nodejs
wget https://gitea.com/gitea/runner/releases/download/v1.0.2/gitea-runner-1.0.2-linux-amd64 -O /usr/local/bin/runner
將 act_runner 設定為可執行檔
chmod +x /usr/local/bin/runner
設定參數
runner register
nano /etc/systemd/system/runner.service
服務檔內容
[Unit] Description=Gitea Actions runner [Service] Environment=HOME=/root Type=simple WorkingDirectory=/root ExecStart=/usr/local/bin/runner daemon Restart=always User=root [Install] WantedBy=multi-user.target
啟動服務
systemctl daemon-reload && systemctl enable runner.service && systemctl start runner.service && systemctl status runner.service
停止服務
systemctl stop act_runner.service && systemctl disable act_runner.service && rm /etc/systemd/system/act_runner.service
Deleting the wiki page "Service:GiteaRunner" cannot be undone. Continue?