Page:
Service:GiteaRunner
Pages
修改成台北時區
將PCIe直通給PVE的虛擬機
延展系統硬碟
憑證 x509 問題
進入 busybox 問題
53 埠被占用
Claude:ccstatusline
Database:PostgreSQL
Database:SQLServer
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block
Service:ASP.NET
Service:Coder
Service:Docker
Service:ElasticSearch
Service:Emby
Service:Gitea
Service:GiteaRunner
Service:Gitlab
Service:MeTube
Service:OpenClaw
Service:OpenCode
Service:PicoClaw
Service:Redis
Service:Traefik
Service:VS Code
Service:Vaultwarden
Service:ezBookkeeping
Service:k3d
Service:netplan
Tool:C# SDK
Tool:Node JS
Tool:Oh My Posh
Clone
Table of Contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
簡介
Gitea Runner(act_runner)負責執行 Gitea Actions 的 CI/CD 工作流程,需向 Gitea 主機註冊後才能接收任務。本文記錄在 Ubuntu 上以二進位檔搭配 systemd 部署 Runner 的步驟。
安裝相依套件
部分 Actions 工作流程需要 Node.js 環境。
apt update && apt install -y nodejs
下載 Gitea Runner
從官方下載指定版本的二進位檔,放到 /usr/local/bin/runner。
wget https://gitea.com/gitea/runner/releases/download/v1.0.2/gitea-runner-1.0.2-linux-amd64 -O /usr/local/bin/runner
wget https://gitea.com/gitea/runner/releases/download/v1.0.8/gitea-runner-1.0.8-linux-amd64 -O /usr/local/bin/runner
下載後將 runner 設定為可執行檔。
chmod +x /usr/local/bin/runner
註冊 Gitea Runner
執行註冊指令,依提示輸入 Gitea 主機位址與註冊權杖(registration token),完成後會在當前目錄產生設定檔。
runner register
建立 Gitea Runner 服務
以 systemd 管理 Runner,可開機自動啟動、崩潰時自動重啟。先建立服務設定檔。
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
啟動服務
重新載入 systemd 設定、設為開機自動啟動、啟動服務並檢視狀態。
systemctl daemon-reload && systemctl enable runner.service && systemctl start runner.service && systemctl status runner.service
停止服務
停止並移除舊版(act_runner)服務時使用。
systemctl stop act_runner.service && systemctl disable act_runner.service && rm /etc/systemd/system/act_runner.service