Skip to content

Commit

Permalink
Disable installing ChromeDriver by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ueokande committed May 26, 2024
1 parent 99092d2 commit b63f8b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
uses: ./
with:
chrome-version: ${{ matrix.version }}
install-chromedriver: true
id: setup-chrome
- if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
uses: ./
with:
chrome-version: 120
install-chromedriver: true
install-dependencies: true
id: setup-chrome
- run: |
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ inputs:
description: |-
Install dependent packages for Google Chrome/Chromium (Linux only).
default: false
no-install-chromedriver:
install-chromedriver:
description: |-
Install only Google Chrome/Chromium browser and skip installing chromedriver
Install the compatible version of ChromeDriver with the installed Google Chrome/Chromium.
default: false
no-sudo:
description: |-
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ async function run(): Promise<void> {
const platform = getPlatform();
const flagInstallDependencies =
core.getInput("install-dependencies") === "true";
const noInstallChromedriver =
core.getInput("no-install-chromedriver") === "true";
const flgInstallChromedriver =
core.getInput("install-chromedriver") === "true";
const noSudo = core.getInput("no-sudo") === "true";

if (flagInstallDependencies) {
Expand All @@ -145,7 +145,7 @@ async function run(): Promise<void> {
core.setOutput("chrome-version", actualBrowserVersion);
core.info(`Successfully setup chromium ${actualBrowserVersion}`);

if (!noInstallChromedriver) {
if (flgInstallChromedriver) {
core.info(`Setup chromedriver ${version}`);

const driverBinPath = await installDriver(installer, version);
Expand Down

0 comments on commit b63f8b4

Please sign in to comment.