Skip to content

Commit 844bf0f

Browse files
committed
fix: nested JSON
1 parent 935d55c commit 844bf0f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,16 @@ jobs:
8888
const inputs = `${{ toJSON(github.event.inputs) }}`;
8989
const opt = {input:{}, dot:{}};
9090
91-
core.info(inputs);
92-
9391
try{
9492
if(inputs.length > 0){
93+
inputs = inputs.replace(/"platform":\s*"\[(.+)\]",/i, /"platform": [$1]/);
9594
opt.input = JSON.parse(inputs);
9695
if(opt.input?.etc){
9796
opt.input.etc = JSON.parse(Buffer.from(opt.input.etc, 'base64').toString('ascii'));
9897
}
9998
}
10099
}catch(e){
101-
core.warning('could not parse github.event.inputs');
100+
core.warning('could not parse github.event.inputs', e);
102101
}
103102
104103
try{

0 commit comments

Comments
 (0)