Skip to content

Commit 87b27e3

Browse files
committed
ci: require icon_names input and drop ALL default
デフォルトの ["ALL"] を廃止し、空入力は明示的なエラーメッセージで 早期に失敗するようにする。
1 parent ef9f1f1 commit 87b27e3

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/build-icon.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
icon_names:
77
description: 'Figma component names (snake_case) as a JSON array, or ["ALL"] for all icons. e.g. ["align_left","album_fill"]'
88
required: true
9-
default: '["ALL"]'
109

1110
permissions:
1211
contents: write
@@ -32,11 +31,17 @@ jobs:
3231
node <<'EOF'
3332
const fs = require('node:fs');
3433
34+
const raw = (process.env.ICON_NAMES ?? '').trim();
35+
if (raw === '') {
36+
console.error('`icon_names` is required. Provide a JSON array of Figma component names, e.g. ["align_left","album_fill"], or ["ALL"] for all icons.');
37+
process.exit(1);
38+
}
39+
3540
let iconNames;
3641
try {
37-
iconNames = JSON.parse(process.env.ICON_NAMES);
42+
iconNames = JSON.parse(raw);
3843
} catch {
39-
console.error('`icon_names` must be a valid JSON array, e.g. ["IconArrowLeft"] or ["ALL"].');
44+
console.error('`icon_names` must be a valid JSON array, e.g. ["align_left"] or ["ALL"].');
4045
process.exit(1);
4146
}
4247

0 commit comments

Comments
 (0)