ci(deploy): stop installing ripgrep and setting sysctl from the gate

The deploy gate runs on a self-hosted runner under an unprivileged user, so the
sudo apt-get install and sudo sysctl steps fail. Both are host provisioning:
ripgrep is installed on the runner host and the userns restriction belongs in
sysctl.d. The namespace check stays, without sudo.
This commit is contained in:
sam committed 2026-10-29 23:57:23 +11:00
1 parent 066522cf5d
commit 3b372b4a91
1 file changed
+5 -11
+5 -11
View File
@@ -84,17 +84,11 @@ jobs:
git branch main origin/main
fi
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ripgrep
# Extensions run in an unprivileged user and network namespace, which
# Ubuntu 24.04 runners forbid through AppArmor by default.
- name: Allow unprivileged user namespaces
run: |
if [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
unshare --user --map-root-user --net true
# ripgrep and the unprivileged-userns sysctl are provisioned on the host.
# A self-hosted runner should not need sudo, and installing a package on
# every run is not the gate's job.
- name: Verify unprivileged user namespaces
run: unshare --user --map-root-user --net true
# The gate's uncached `go test ./...` runs the Docker-backed tests that
# -short skips, and those start a container from alpine:3. A fresh runner