Skip to content

Commit c039fd4

Browse files
committed
ci: add option to skip browser downloads in dependency installation
1 parent 94205bc commit c039fd4

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

.github/workflows/dependencies-install/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: 'Install node dependencies'
22
description: 'Installs the node dependencies of inovex-elements packages'
33
author: 'Benjamin Pagelsdorf'
4+
inputs:
5+
skip-browsers:
6+
description: 'Skip Puppeteer/Playwright browser downloads'
7+
required: false
8+
default: 'false'
49

510
runs:
611
using: 'composite'
@@ -20,13 +25,15 @@ runs:
2025
cache: 'pnpm'
2126

2227
- name: Get Puppeteer version
28+
if: inputs.skip-browsers != 'true'
2329
id: puppeteer-version
2430
run: |
2531
PUPPETEER_VERSION=$(node -p "require('./packages/elements/package.json').devDependencies.puppeteer")
2632
echo "version=$PUPPETEER_VERSION" >> $GITHUB_OUTPUT
2733
shell: bash
2834

2935
- name: Cache Puppeteer Chrome Binary
36+
if: inputs.skip-browsers != 'true'
3037
uses: actions/cache@v4
3138
with:
3239
path: ~/.cache/puppeteer
@@ -48,3 +55,6 @@ runs:
4855
- name: Install Dependencies
4956
run: pnpm install --frozen-lockfile
5057
shell: bash
58+
env:
59+
PUPPETEER_SKIP_DOWNLOAD: ${{ inputs.skip-browsers == 'true' && 'true' || 'false' }}
60+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: ${{ inputs.skip-browsers == 'true' && 'true' || 'false' }}

.github/workflows/deploy-landingpage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: ./.github/workflows/dependencies-install
16+
with:
17+
skip-browsers: 'true'
1618
- name: Build landingpage ⚒️
1719
run: pnpm turbo run build --filter @inovex.de/landingpage
1820
env:

.github/workflows/release.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,9 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323

24-
- uses: pnpm/action-setup@v2
24+
- uses: ./.github/workflows/dependencies-install
2525
with:
26-
version: 9
27-
28-
- uses: actions/setup-node@v4
29-
with:
30-
node-version: 20
31-
cache: 'pnpm'
32-
33-
- name: Install Dependencies
34-
run: pnpm install --frozen-lockfile
26+
skip-browsers: 'true'
3527

3628
- name: Build Packages
3729
run: pnpm build

0 commit comments

Comments
 (0)