refactor(ci): replace sudo commands with exec-priv.sh for improved privilege handling in CI workflows

This commit is contained in:
Ivan 2026-04-01 11:00:29 +03:00
parent 242325b0d2
commit d5e4afc42b
No known key found for this signature in database
GPG key ID: 7FD8154D9416F101
6 changed files with 19 additions and 12 deletions

7
scripts/ci/exec-priv.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/sh
# Run a command with root privileges: use sudo only when not root (Docker/act often have no sudo).
# Usage: sh scripts/ci/exec-priv.sh apt-get update
set -eu
. "$(dirname "$0")/priv.sh"
run_priv "$@"