ci: updated base-image

This commit is contained in:
Marvin Zhang
2024-11-22 18:06:09 +08:00
parent c8c86e1644
commit 92f460424e

View File

@@ -20,14 +20,16 @@ apt-get install -y \
# Install puppeteer browsers package globally first
npm install -g @puppeteer/browsers
# Chrome path
CHROME_PATH="/chrome/linux-${version}/chrome-linux64"
CHROME_BIN="$CHROME_PATH/chrome"
# Install chrome with auto-yes
npx -y @puppeteer/browsers install chrome@${version} \
--install-deps \
--path=/chrome
--path="$CHROME_PATH"
# Add Chrome to PATH
CHROME_PATH="/chrome/linux-${version}/chrome-linux64"
CHROME_BIN="$CHROME_PATH/chrome"
# Add chrome to PATH
ln -s "$CHROME_BIN" /usr/local/bin/google-chrome
# Verify chrome is installed (with more detailed error message)