install deps on user basis instead of globally
This commit is contained in:
parent
7b63f9164d
commit
365292dac1
@ -42,7 +42,7 @@ jobs:
|
|||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: Development/server/package-lock.json
|
cache-dependency-path: Development/server/package-lock.json
|
||||||
|
|
||||||
- name: Install MongoDB runtime compatibility libraries
|
- name: Prepare MongoDB runtime compatibility libraries
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -51,30 +51,26 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v apt-get >/dev/null 2>&1; then
|
LIBSSL_DIR="${RUNNER_TEMP:-/tmp}/libssl11"
|
||||||
echo "apt-get is not available on this runner; cannot install libssl1.1 automatically"
|
DEB_PATH="${RUNNER_TEMP:-/tmp}/libssl1.1.deb"
|
||||||
|
mkdir -p "$LIBSSL_DIR"
|
||||||
|
|
||||||
|
if [ ! -f "$DEB_PATH" ]; then
|
||||||
|
curl -fsSL \
|
||||||
|
-o "$DEB_PATH" \
|
||||||
|
"http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dpkg-deb -x "$DEB_PATH" "$LIBSSL_DIR"
|
||||||
|
|
||||||
|
LIB_DIR="$LIBSSL_DIR/usr/lib/x86_64-linux-gnu"
|
||||||
|
if [ ! -f "$LIB_DIR/libcrypto.so.1.1" ]; then
|
||||||
|
echo "libcrypto.so.1.1 was not found after extracting $DEB_PATH"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v sudo >/dev/null 2>&1; then
|
echo "LD_LIBRARY_PATH=$LIB_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
|
||||||
SUDO=sudo
|
echo "Prepared OpenSSL 1.1 compatibility libraries in $LIB_DIR"
|
||||||
else
|
|
||||||
SUDO=
|
|
||||||
fi
|
|
||||||
|
|
||||||
. /etc/os-release
|
|
||||||
|
|
||||||
if [ "${ID:-}" = "ubuntu" ]; then
|
|
||||||
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | $SUDO tee /etc/apt/sources.list.d/focal-security.list >/dev/null
|
|
||||||
elif [ "${ID:-}" = "debian" ]; then
|
|
||||||
echo "deb http://deb.debian.org/debian bullseye main" | $SUDO tee /etc/apt/sources.list.d/bullseye.list >/dev/null
|
|
||||||
else
|
|
||||||
echo "Unsupported distro for automatic libssl1.1 install: ${ID:-unknown}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
$SUDO apt-get update
|
|
||||||
$SUDO apt-get install -y libssl1.1
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
env:
|
env:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user