mirror of
https://github.com/gotson/komga.git
synced 2026-05-02 21:30:24 +00:00
28 lines
1 KiB
YAML
28 lines
1 KiB
YAML
# From https://github.com/microsoft/playwright/issues/7249#issuecomment-2806545369
|
|
name: "Setup Playwright"
|
|
description: "Setup Playwright with caching, using npm (should already be installed)"
|
|
inputs:
|
|
working-directory:
|
|
description: Specifies the working directory for the Playwright installation.
|
|
default: .
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Extract Playwright version
|
|
id: playwright-version
|
|
shell: bash
|
|
run: echo "PLAYWRIGHT_VERSION=$(jq -r '.packages."".devDependencies.playwright' package-lock.json)" >> $GITHUB_ENV
|
|
working-directory: ${{ inputs.working-directory }}
|
|
|
|
- name: Cache Playwright
|
|
id: playwright-cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: playwright-${{ runner.os }}-${{ env.PLAYWRIGHT_VERSION }}
|
|
|
|
- name: Install Playwright dependencies
|
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
shell: bash
|
|
run: npx playwright install --with-deps --only-shell
|
|
working-directory: ${{ inputs.working-directory }}
|