You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: action.yml
+51-32Lines changed: 51 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,9 @@ inputs:
11
11
required: false
12
12
default: "latest"
13
13
browsers:
14
-
description: 'Browsers to install as a JSON array (e.g., ["chrome","firefox"])or "all". Allowed: chrome, chromium, firefox, webkit, msedge.'
14
+
description: 'Browsers as a JSON array (["chrome","firefox"]), "all", or a single string like "chrome". Allowed: chrome, chromium, firefox, webkit, msedge.'
15
15
required: false
16
-
default: '["chrome"]'
16
+
default: "chrome"
17
17
browsers-path:
18
18
description: "Optional custom directory to store browser binaries (sets PLAYWRIGHT_BROWSERS_PATH)."
19
19
required: false
@@ -45,39 +45,52 @@ runs:
45
45
node - <<'NODE'
46
46
const fs = require('fs');
47
47
const out = process.env.GITHUB_OUTPUT;
48
-
const raw = process.env.INPUT_BROWSERS || '["chrome"]';
48
+
const raw = (process.env.INPUT_BROWSERS ?? 'chrome').trim();
49
49
const os = process.env.RUNNER_OS || '';
50
-
let cli, json;
50
+
const allowed = new Set(['chrome','chromium','firefox','webkit','msedge']);
51
51
52
-
if (raw.trim().toLowerCase() === 'all') {
53
-
cli = 'all';
54
-
json = '["chromium","firefox","webkit"]';
55
-
} else {
56
-
let arr;
57
-
try { arr = JSON.parse(raw); } catch {
58
-
console.error('Input "browsers" must be a JSON array like ["chrome","firefox"] or the string "all".');
0 commit comments