From 276150a769ab22763b6e5a5de8b44ff8d491296f Mon Sep 17 00:00:00 2001 From: hibna Date: Sun, 2 Aug 2026 21:08:24 +0300 Subject: [PATCH] Install protoc without sudo on self-hosted runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The daemon job assumed a GitHub-hosted runner, where the build user is unprivileged and sudo exists. Our act runner is a container that runs as root and ships no sudo, so the step died with "sudo: command not found" before the toolchain was ever installed — which also blocked the publish job that waits on it. Use sudo only when we are not already root, so the step works on both. --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fa142b..892382e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,14 @@ jobs: steps: - uses: actions/checkout@v4 + # Self-hosted act runners run as root in a container that has no sudo, + # while GitHub-hosted runners need it. Pick whichever exists. - name: Install protoc - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler + run: | + SUDO="" + if [ "$(id -u)" -ne 0 ]; then SUDO="sudo"; fi + $SUDO apt-get update + $SUDO apt-get install -y protobuf-compiler - uses: dtolnay/rust-toolchain@stable with: