Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/actions/setup-runner-isolation/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ runs:
if: inputs.install-subprocess-isolation == 'true'
shell: bash
run: |
# Each apt call is bounded, so a stalled mirror or held lock fails this
# step in minutes instead of holding the job to its timeout; a run that
# cannot install fails closed below. An image that already ships both
# tools skips apt.
apt=(-o Acquire::Retries=2 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 -o DPkg::Lock::Timeout=60)
for i in 1 2 3; do
sudo apt-get update -qq &&
sudo apt-get install -y --no-install-recommends bubblewrap socat && break
echo "apt-get attempt $i failed, retrying..."
if command -v bwrap >/dev/null && command -v socat >/dev/null; then
break
fi
timeout 180 sudo apt-get "${apt[@]}" update -qq &&
timeout 180 sudo apt-get "${apt[@]}" install -y --no-install-recommends bubblewrap socat && break
echo "apt-get attempt $i failed or timed out, retrying..."
sleep 5
done
# Ubuntu 24.04 restricts unprivileged user namespaces via AppArmor.
Expand Down
Loading