-
Notifications
You must be signed in to change notification settings - Fork 672
Expand file tree
/
Copy pathaction.yml
More file actions
31 lines (27 loc) · 974 Bytes
/
action.yml
File metadata and controls
31 lines (27 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Chrome headless shell installer
description: Install chrome-headless-shell
# Chrome headless shell
# https://developer.chrome.com/blog/chrome-headless-shell
inputs:
chrome-version:
description: Chrome headless shell version to install
default: "latest"
runs:
using: composite
steps:
- name: Setup chrome-headless-shell
shell: bash
env:
CHROME_VERSION: ${{ inputs.chrome-version }}
run: |
if [ -n "$CHROME_VERSION" ]; then
echo "version to install: $CHROME_VERSION"
PUPPETEER_CMD="install chrome-headless-shell@$CHROME_VERSION"
CHROME_BIN=`npx --no-install @puppeteer/browsers $PUPPETEER_CMD | awk '{print $2}'`
echo "chrome-headless-shell installed in: $CHROME_BIN"
chmod +x $CHROME_BIN
$CHROME_BIN --version
echo "CHROME_SHELL=$CHROME_BIN" >> $GITHUB_ENV
else
echo "chrome-headless-shell not installed!"
fi