Merge pull request 'fix(ci): run apt non-interactively so needrestart cannot hang a runner' (#9) from fix/ci-noninteractive-apt into main

This commit is contained in:
2026-10-05 01:49:32 +00:00
2 changed files with 12 additions and 3 deletions
+10 -2
View File
@@ -3,5 +3,13 @@
# both need the exact same Linux build dependencies. Edit once, here. # both need the exact same Linux build dependencies. Edit once, here.
set -euo pipefail set -euo pipefail
sudo apt-get update -qq # Non-interactive, or a self-hosted Debian runner hangs forever: after an
sudo apt-get install -y -qq cmake ninja-build libobs-dev libcurl4-openssl-dev # install, needrestart asks which daemons to restart ("1. postfix.service
# 2. none of the above") and waits on a terminal CI does not have. That
# stalled the v0.1.2 Linux release job on 2026-10-05. NEEDRESTART_MODE=a
# answers it; DEBIAN_FRONTEND covers debconf prompts. Passed through sudo
# explicitly, since sudo drops the caller's environment by default.
APT=(sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get)
"${APT[@]}" update -qq
"${APT[@]}" install -y -qq cmake ninja-build libobs-dev libcurl4-openssl-dev
+2 -1
View File
@@ -41,7 +41,8 @@ jobs:
# zip is not guaranteed present on a minimal self-hosted runner # zip is not guaranteed present on a minimal self-hosted runner
# image (unlike GitHub-hosted ubuntu-24.04, which build.yml's # image (unlike GitHub-hosted ubuntu-24.04, which build.yml's
# deps script doesn't need to care about). # deps script doesn't need to care about).
command -v zip >/dev/null || sudo apt-get install -y -qq zip # Non-interactive for the same reason as .gitea/scripts/linux-deps.sh.
command -v zip >/dev/null || sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y -qq zip
out="streamer-tools-camera-${GITEA_REF_NAME}-linux-x64.zip" out="streamer-tools-camera-${GITEA_REF_NAME}-linux-x64.zip"
root="$(pwd)" root="$(pwd)"