setup-browser/action.yaml

44 lines
1.4 KiB
YAML
Raw Normal View History

2024-12-27 00:40:49 +01:00
name: 'Setup Browser'
description: |
Installs a browser from various sources to use for tests.
Are supported:
2024-12-27 01:31:55 +01:00
- Ungoogled Chromium (`uchromium`), available versions are listed
[here](https://ungoogled-software.github.io/ungoogled-chromium-binaries/releases/appimage/64bit/).
2024-12-27 00:40:49 +01:00
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: |
2024-12-27 01:01:34 +01:00
set -x
2024-12-27 01:26:53 +01:00
apt-get update && apt-get install libfuse2
2024-12-27 00:40:49 +01:00
INSTALL_PATH=${INSTALL_PATH:-/opt/${TARGET%%:*}}
./setup-browser install \
-cache-path cache \
-install-to "$INSTALL_PATH" \
2024-12-27 01:01:34 +01:00
"${TARGET}"
2024-12-27 00:40:49 +01:00
echo "$(dirname "$INSTALL_PATH")" >> "$GITHUB_PATH"
shell: bash
env:
TARGET: ${{ inputs.target }}
INSTALL_PATH: ${{ inputs.install-path }}