File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 - name : Install OpenSSH client
2525 shell : bash
2626 run : |
27+ if command -v ssh >/dev/null 2>&1 && command -v ssh-keygen >/dev/null 2>&1; then
28+ echo "OpenSSH client is already installed; skipping apt install"
29+ exit 0
30+ fi
31+
2732 for attempt in 1 2 3; do
2833 sudo rm -rf /var/lib/apt/lists/*
29- if sudo apt-get -o Acquire::Retries=3 -o Acquire::By-Hash=force update; then
34+ if sudo timeout 120s apt-get \
35+ -o Acquire::Retries=3 \
36+ -o Acquire::By-Hash=force \
37+ -o Acquire::http::Timeout=20 \
38+ -o Acquire::https::Timeout=20 \
39+ update; then
3040 break
3141 fi
3242 if [[ "$attempt" == "3" ]]; then
3646 echo "apt-get update attempt ${attempt} failed; retrying..." >&2
3747 sleep $((attempt * 2))
3848 done
39- sudo apt-get -o Acquire::Retries=3 install -y openssh-client
49+ sudo timeout 120s apt-get \
50+ -o Acquire::Retries=3 \
51+ -o Acquire::http::Timeout=20 \
52+ -o Acquire::https::Timeout=20 \
53+ install -y openssh-client
4054 - name : Install node-gyp
4155 shell : bash
4256 run : npm install -g node-gyp
You can’t perform that action at this time.
0 commit comments