browser-actions / setup-chrome

Set up your GitHub Actions workflow with a specific version of chromium
https://github.com/marketplace/actions/setup-chrome
MIT License
158 stars 63 forks source link
chrome chromium github-actions

typescript-action status

setup-chrome

This action sets-up Google Chrome/Chromium for GitHub Actions. This action supports the following features:

Usage

Here is a basic usage. The action installs the latest build by default.

steps:
  - uses: browser-actions/setup-chrome@v1
  - run: chrome --version

To install a specific channel, use chrome-version input.

steps:
  - uses: browser-actions/setup-chrome@v1
    with:
      chrome-version: 120

The action support installing the compatible ChromeDriver with the browser. You can use the install-chromedriver to install the ChromeDriver.

steps:
  - uses: browser-actions/setup-chrome@v1
    with:
      chrome-version: 120
      install-chromedriver: true

If you use the self-hosted runner, your runner may not have the required dependencies on the system. You can install the dependencies by using the install-dependencies parameter. It installs the required dependencies for the Google Chrome/Chromium to run automatically.

steps:
  - uses: browser-actions/setup-chrome@v1
    with:
      chrome-version: 120
      install-dependencies: true

Supported version formats

The action supports the following version formats:

Installed path

The installed binary name is not always chrome or chromium. It depends on your installation spec and OS.

To get the installed binary path, use chrome-path output of the action:

steps:
  - uses: browser-actions/setup-chrome@v1
    id: setup-chrome
  - run: |
      ${{ steps.setup-chrome.outputs.chrome-path }} --version

Parameters

Inputs

Outputs

License

MIT