setup-browser/action.yaml
Bruno Carlin 737fe3aa7a
All checks were successful
/ Move action v0 tag (push) Successful in 21s
fixaction): appimage run needs an env var
2024-12-27 01:43:34 +01:00

42 lines
1.4 KiB
YAML

name: 'Setup Browser'
description: |
Installs a browser from various sources to use for tests.
Are supported:
- Ungoogled Chromium (`uchromium`), available versions are listed
[here](https://ungoogled-software.github.io/ungoogled-chromium-binaries/releases/appimage/64bit/).
inputs:
target:
description: |
The browser and ersion to install in the form `BROWSER:VERSION`.
The version is optional.
required: true
install-path:
description: |
The path where the binary should be installed.
The path is added to the system PATH for subsequent steps.
runs:
using: "composite"
steps:
- name: Download setup-browser
working-directory: ${{ github.action_path }}
run: |
wget -q https://code.bcarlin.net/actions/setup-browser/releases/download/latest/setup-browser
chmod +x setup-browser
shell: bash
- name: Download the browser
working-directory: ${{ github.action_path }}
run: |
set -x
INSTALL_PATH=${INSTALL_PATH:-/opt/${TARGET%%:*}}
./setup-browser install \
-cache-path cache \
-install-to "$INSTALL_PATH" \
"${TARGET}"
echo "$(dirname "$INSTALL_PATH")" >> "$GITHUB_PATH"
echo "APPIMAGE_EXTRACT_AND_RUN=true" >> "$GITHUB_ENV"
shell: bash
env:
TARGET: ${{ inputs.target }}
INSTALL_PATH: ${{ inputs.install-path }}