diff --git a/ct/gitea-runner.sh b/ct/gitea-runner.sh deleted file mode 100644 index 4eacbcb4dd..0000000000 --- a/ct/gitea-runner.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env bash -_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" -_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" -source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") - -# Copyright (c) 2021-2026 community-scripts ORG -# Author: community-scripts -# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE -# Source: https://gitea.com/gitea/runner - -APP="Gitea-Runner" -var_tags="${var_tags:-ci;git}" -var_cpu="${var_cpu:-2}" -var_arm64="${var_arm64:-yes}" -var_unprivileged="${var_unprivileged:-1}" -# Needed for container-based workflow execution (Docker/Podman inside LXC) -var_nesting="${var_nesting:-1}" -var_keyctl="${var_keyctl:-1}" - -if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then - var_os=$(msg_menu "Choose the container OS" \ - "debian" "Debian 13" \ - "alpine" "Alpine 3.24 (smaller)") -fi - -var_os="${var_os:-debian}" -if [[ "${var_os:-}" == "alpine" ]]; then - var_ram="${var_ram:-1024}" - var_disk="${var_disk:-4}" - var_version="${var_version:-3.24}" -else - var_ram="${var_ram:-2048}" - var_disk="${var_disk:-8}" - var_version="${var_version:-13}" -fi -var_testurl="${var_testurl:-https://github.com/community-scripts/DevScripts/issues/2308}" - -export var_gitea_url="${var_gitea_url:-}" -export var_gitea_token="${var_gitea_token:-}" - -header_info "$APP" -variables -color -catch_errors - -update_deb_based() { - if [[ ! -f /usr/local/bin/gitea-runner ]]; then - msg_error "No ${APP} Installation Found!" - exit 1 - fi - - ensure_dependencies git - - RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//') - if [[ "${RELEASE}" == "$(cat ~/.gitea-runner 2>/dev/null)" ]]; then - msg_ok "No update required. ${APP} is already at v${RELEASE}" - exit - fi - - msg_info "Stopping Service" - systemctl stop gitea-runner - msg_ok "Stopped Service" - - msg_info "Updating ${APP} to v${RELEASE}" - $STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)" - chmod +x /usr/local/bin/gitea-runner - ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner - echo "${RELEASE}" >~/.gitea-runner - msg_ok "Updated ${APP} to v${RELEASE}" - - msg_info "Starting Service" - systemctl start gitea-runner - msg_ok "Started Service" - msg_ok "Updated successfully!" -} - -update_alpine() { - if [[ ! -f /usr/local/bin/gitea-runner ]]; then - msg_error "No ${APP} Installation Found!" - exit 1 - fi - - msg_info "Updating Alpine Packages" - $STD apk -U upgrade - $STD apk add --no-cache git - msg_ok "Updated Alpine Packages" - - RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//') - if [[ "${RELEASE}" == "$(cat ~/.gitea-runner 2>/dev/null)" ]]; then - msg_ok "No update required. ${APP} is already at v${RELEASE}" - exit - fi - - msg_info "Stopping Service" - $STD rc-service gitea-runner stop - msg_ok "Stopped Service" - - msg_info "Updating ${APP} to v${RELEASE}" - $STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)" - chmod +x /usr/local/bin/gitea-runner - ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner - echo "${RELEASE}" >~/.gitea-runner - msg_ok "Updated ${APP} to v${RELEASE}" - - msg_info "Starting Service" - $STD rc-service gitea-runner start - msg_ok "Started Service" - msg_ok "Updated successfully!" -} - -function update_script() { - header_info - check_container_storage - check_container_resources - run_os_update -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW}To register the runner, execute the following command in the container console:${CL}" -if [[ -n "${var_gitea_url:-}" ]]; then - echo -e "${TAB}${BGN}gitea-runner -c /etc/gitea-runner/config.yaml register --instance ${var_gitea_url} --token ${CL}" -else - echo -e "${TAB}${BGN}gitea-runner -c /etc/gitea-runner/config.yaml register --instance --token ${CL}" -fi -echo -e "${INFO}${YW}After registering, start the runner daemon:${CL}" -if [[ "${var_os:-}" == "alpine" ]]; then - echo -e "${TAB}${BGN}rc-service gitea-runner start${CL}" -else - echo -e "${TAB}${BGN}systemctl start gitea-runner${CL}" -fi -echo -e "${INFO}${YW}Official registration documentation:${CL}" -echo -e "${GATEWAY}${BGN}https://docs.gitea.com/runner/registration/${CL}" diff --git a/install/gitea-runner-install.sh b/install/gitea-runner-install.sh deleted file mode 100644 index 3f78bdf264..0000000000 --- a/install/gitea-runner-install.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2026 community-scripts ORG -# Author: community-scripts -# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE -# Source: https://gitea.com/gitea/runner - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -setup_deb_based() { - msg_info "Installing Dependencies" - $STD apt install -y git - msg_ok "Installed Dependencies" - - setup_docker - - msg_info "Installing Gitea Runner" - RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//') - $STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)" - chmod +x /usr/local/bin/gitea-runner - ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner - echo "${RELEASE}" >~/.gitea-runner - msg_ok "Installed Gitea Runner v${RELEASE}" - - msg_info "Configuring Gitea Runner" - mkdir -p /etc/gitea-runner /var/lib/gitea-runner - /usr/local/bin/gitea-runner config generate >/etc/gitea-runner/config.yaml - sed -i 's|.*file:.*\.runner.*| file: /var/lib/gitea-runner/.runner|' /etc/gitea-runner/config.yaml - msg_ok "Configured Gitea Runner" - - if [[ -n "${var_gitea_url:-}" ]] && [[ -n "${var_gitea_token:-}" ]]; then - msg_info "Registering Gitea Runner" - $STD /usr/local/bin/gitea-runner register --no-interactive --config /etc/gitea-runner/config.yaml --instance "${var_gitea_url}" --token "${var_gitea_token}" --name "$(hostname)" - msg_ok "Registered Gitea Runner" - fi - - msg_info "Creating Service" - cat </etc/systemd/system/gitea-runner.service -[Unit] -Description=Gitea Actions Runner -Documentation=https://docs.gitea.com/runner/ -After=network-online.target docker.service -Wants=network-online.target docker.service - -[Service] -Type=simple -ExecStart=/usr/local/bin/gitea-runner daemon --config /etc/gitea-runner/config.yaml -WorkingDirectory=/var/lib/gitea-runner -Environment=HOME=/var/lib/gitea-runner -Restart=on-failure -RestartSec=5s -TimeoutStopSec=3h - -[Install] -WantedBy=multi-user.target -EOF - systemctl enable -q gitea-runner - if [[ -s /var/lib/gitea-runner/.runner ]]; then - systemctl start gitea-runner - fi - msg_ok "Created Service" -} - -setup_alpine() { - msg_info "Installing Docker" - $STD apk add --no-cache docker docker-cli-compose git - $STD rc-update add docker default - $STD rc-service docker start - msg_ok "Installed Docker" - - msg_info "Installing Gitea Runner" - RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//') - $STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)" - chmod +x /usr/local/bin/gitea-runner - ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner - echo "${RELEASE}" >~/.gitea-runner - msg_ok "Installed Gitea Runner v${RELEASE}" - - msg_info "Configuring Gitea Runner" - mkdir -p /etc/gitea-runner /var/lib/gitea-runner - /usr/local/bin/gitea-runner config generate >/etc/gitea-runner/config.yaml - sed -i 's|.*file:.*\.runner.*| file: /var/lib/gitea-runner/.runner|' /etc/gitea-runner/config.yaml - msg_ok "Configured Gitea Runner" - - if [[ -n "${var_gitea_url:-}" ]] && [[ -n "${var_gitea_token:-}" ]]; then - msg_info "Registering Gitea Runner" - $STD /usr/local/bin/gitea-runner register --no-interactive --config /etc/gitea-runner/config.yaml --instance "${var_gitea_url}" --token "${var_gitea_token}" --name "$(hostname)" - msg_ok "Registered Gitea Runner" - fi - - msg_info "Creating Service" - cat <<'EOF' >/etc/init.d/gitea-runner -#!/sbin/openrc-run -name="gitea-runner" -description="Gitea Actions Runner" - -export HOME="/var/lib/gitea-runner" -command="/usr/local/bin/gitea-runner" -command_args="daemon --config /etc/gitea-runner/config.yaml" -directory="/var/lib/gitea-runner" -command_background="yes" -pidfile="/run/gitea-runner.pid" -output_log="/var/log/gitea-runner.log" -error_log="/var/log/gitea-runner.log" - -depend() { - need net docker - after firewall -} -EOF - chmod +x /etc/init.d/gitea-runner - $STD rc-update add gitea-runner default - if [[ -s /var/lib/gitea-runner/.runner ]]; then - $STD rc-service gitea-runner start - fi - msg_ok "Created Service" -} - -run_os_setup - -motd_ssh -customize -cleanup_lxc diff --git a/json/gitea-runner.json b/json/gitea-runner.json deleted file mode 100644 index 096f3836bf..0000000000 --- a/json/gitea-runner.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "Gitea Runner", - "slug": "gitea-runner", - "categories": [ - 20 - ], - "date_created": "2026-09-24", - "type": "ct", - "platforms": ["pve"], - "updateable": true, - "privileged": false, - "architectures": [ - "amd64", - "arm64" - ], - "interface_port": null, - "documentation": "https://docs.gitea.com/runner/", - "website": "https://gitea.com/gitea/runner", - "repository": "https://gitea.com/gitea/runner", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/gitea.webp", - "description": "Gitea Runner (act_runner) is the daemon that executes CI/CD jobs for Gitea Actions. It connects to your Gitea instance, polls for queued workflow runs, and executes tasks using either host execution or containerized engines.", - "install_methods": [ - { - "type": "default", - "script": "ct/gitea-runner.sh", - "config_path": "/etc/gitea-runner/config.yaml", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 8, - "os": "Debian", - "version": "13" - } - }, - { - "type": "alpine", - "script": "ct/gitea-runner.sh", - "config_path": "/etc/gitea-runner/config.yaml", - "resources": { - "cpu": 2, - "ram": 1024, - "hdd": 4, - "os": "Alpine", - "version": "3.24" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "app_vars": [ - { - "name": "var_gitea_url", - "label": "Gitea Instance URL", - "type": "text", - "required": false, - "help": "URL of your Gitea instance (e.g. http://192.168.1.100:3000 or https://gitea.example.com)" - }, - { - "name": "var_gitea_token", - "label": "Registration Token", - "type": "password", - "secret": true, - "required": false, - "help": "Runner registration token from Gitea (Site Administration > Actions > Runners or Repo/Org Settings > Actions > Runners)" - } - ], - "notes": [ - { - "text": "Create a registration token in Gitea under Site Administration > Actions > Runners and enter it with your Gitea URL during setup, so the runner registers and starts on its own.", - "type": "info" - }, - { - "text": "Skipped that step? Run the register command the install prints, then start the gitea-runner service.", - "type": "info" - } - ] -}