diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4c958a708..a53058b94 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -85,7 +85,11 @@ jobs: # 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: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + 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 # 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