Skip to content

Commit 503b7de

Browse files
committed
list wasn't working
1 parent 0366e92 commit 503b7de

File tree

3 files changed

+91
-6
lines changed

3 files changed

+91
-6
lines changed

.github/workflows/package-cache-automation.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@ on:
44
workflow_dispatch:
55
inputs:
66
package_name:
7-
description: 'Package to cache (cypress, electron, puppeteer, or leave empty for all)'
7+
description: 'Package to cache (or leave empty for all whitelisted packages)'
88
required: false
99
type: choice
1010
options:
11-
- ''
11+
- 'all'
1212
- cypress
1313
- electron
14+
- playwright
1415
- puppeteer
15-
default: ''
16+
- playwright-core
17+
- playwright-chromium
18+
- playwright-firefox
19+
- playwright-webkit
20+
- chromium
21+
- firefox
22+
- webkit
23+
- node
24+
- npm
25+
- yarn
26+
default: 'all'
1627
deploy:
1728
description: 'Actually create the release (default: dry run)'
1829
required: false
@@ -65,7 +76,7 @@ jobs:
6576
6677
# Determine which package to process
6778
PACKAGE_FLAG=""
68-
if [ -n "${{ github.event.inputs.package_name }}" ]; then
79+
if [ -n "${{ github.event.inputs.package_name }}" ] && [ "${{ github.event.inputs.package_name }}" != "all" ]; then
6980
PACKAGE_FLAG="--package=${{ github.event.inputs.package_name }}"
7081
fi
7182
@@ -78,7 +89,7 @@ jobs:
7889
echo "## Package Cache Automation Summary" >> $GITHUB_STEP_SUMMARY
7990
echo "" >> $GITHUB_STEP_SUMMARY
8091
echo "**Source Repository:** Opentrons/opentrons (edge branch)" >> $GITHUB_STEP_SUMMARY
81-
echo "**Target Package:** ${{ github.event.inputs.package_name || 'All binary packages found' }}" >> $GITHUB_STEP_SUMMARY
92+
echo "**Target Package:** ${{ github.event.inputs.package_name || 'All whitelisted packages' }}" >> $GITHUB_STEP_SUMMARY
8293
echo "**Deploy Mode:** ${{ github.event.inputs.deploy || (github.event_name == 'schedule' && 'true') || (github.event_name == 'push' && 'true') || 'false' }}" >> $GITHUB_STEP_SUMMARY
8394
echo "**Trigger:** ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
8495
echo "" >> $GITHUB_STEP_SUMMARY

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,23 @@ Instead of downloading package binaries from official sources every time, this r
88

99
## Supported Packages
1010

11+
### Binary Packages
1112
- **Cypress** - End-to-end testing framework
1213
- **Electron** - Desktop app framework
13-
- More packages can be added as needed
14+
- **Playwright** - Browser automation framework
15+
- **Puppeteer** - Chrome/Chromium automation
16+
- **Playwright Core** - Core Playwright functionality
17+
- **Playwright Chromium** - Chromium browser for Playwright
18+
- **Playwright Firefox** - Firefox browser for Playwright
19+
- **Playwright WebKit** - WebKit browser for Playwright
20+
- **Chromium** - Standalone Chromium browser
21+
- **Firefox** - Standalone Firefox browser
22+
- **WebKit** - Standalone WebKit browser
23+
24+
### NPM Packages
25+
- **Node** - Node.js runtime
26+
- **NPM** - Node package manager
27+
- **Yarn** - Alternative package manager
1428

1529
## How it works
1630

scripts/package-cache-automation.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ const ALLOWED_PACKAGES = new Set([
6262
'electron',
6363
'playwright',
6464
'puppeteer',
65+
'playwright-core',
66+
'playwright-chromium',
67+
'playwright-firefox',
68+
'playwright-webkit',
6569
'chromium',
6670
'firefox',
6771
'webkit',
@@ -166,6 +170,62 @@ const BINARY_PACKAGES = {
166170
},
167171
getFilename: (version, platform, arch) =>
168172
`webkit-${version}-${platform}-${arch}.zip`
173+
},
174+
'playwright-core': {
175+
name: 'Playwright Core',
176+
platforms: [
177+
{ os: 'Linux', platform: 'linux', arch: 'x64' },
178+
{ os: 'macOS', platform: 'darwin', arch: 'x64' },
179+
{ os: 'Windows', platform: 'win32', arch: 'x64' }
180+
],
181+
getDownloadUrl: (version, platform, arch) => {
182+
// Playwright Core downloads browser binaries
183+
return `https://playwright.azureedge.net/builds/playwright-core-${version}-${platform}-${arch}.zip`
184+
},
185+
getFilename: (version, platform, arch) =>
186+
`playwright-core-${version}-${platform}-${arch}.zip`
187+
},
188+
'playwright-chromium': {
189+
name: 'Playwright Chromium',
190+
platforms: [
191+
{ os: 'Linux', platform: 'linux', arch: 'x64' },
192+
{ os: 'macOS', platform: 'darwin', arch: 'x64' },
193+
{ os: 'Windows', platform: 'win32', arch: 'x64' }
194+
],
195+
getDownloadUrl: (version, platform, arch) => {
196+
// Playwright Chromium downloads Chromium binaries
197+
return `https://playwright.azureedge.net/builds/chromium-${version}-${platform}-${arch}.zip`
198+
},
199+
getFilename: (version, platform, arch) =>
200+
`playwright-chromium-${version}-${platform}-${arch}.zip`
201+
},
202+
'playwright-firefox': {
203+
name: 'Playwright Firefox',
204+
platforms: [
205+
{ os: 'Linux', platform: 'linux', arch: 'x64' },
206+
{ os: 'macOS', platform: 'darwin', arch: 'x64' },
207+
{ os: 'Windows', platform: 'win32', arch: 'x64' }
208+
],
209+
getDownloadUrl: (version, platform, arch) => {
210+
// Playwright Firefox downloads Firefox binaries
211+
return `https://playwright.azureedge.net/builds/firefox-${version}-${platform}-${arch}.zip`
212+
},
213+
getFilename: (version, platform, arch) =>
214+
`playwright-firefox-${version}-${platform}-${arch}.zip`
215+
},
216+
'playwright-webkit': {
217+
name: 'Playwright WebKit',
218+
platforms: [
219+
{ os: 'Linux', platform: 'linux', arch: 'x64' },
220+
{ os: 'macOS', platform: 'darwin', arch: 'x64' },
221+
{ os: 'Windows', platform: 'win32', arch: 'x64' }
222+
],
223+
getDownloadUrl: (version, platform, arch) => {
224+
// Playwright WebKit downloads WebKit binaries
225+
return `https://playwright.azureedge.net/builds/webkit-${version}-${platform}-${arch}.zip`
226+
},
227+
getFilename: (version, platform, arch) =>
228+
`playwright-webkit-${version}-${platform}-${arch}.zip`
169229
}
170230
}
171231

0 commit comments

Comments
 (0)