GitHub Actions矩阵作业调用动态JSON时fromJson解析报错求助
我通过GitHub Actions拉取JSON数据,使用jq -r '[.hits[].id]'命令提取特定字段生成新的JSON数组,对应文件为Data/WaList_Converted.json。但在矩阵作业中尝试通过${{fromJson(needs.setup.outputs.wa_List)}}调用该数组时,出现解析错误:
Error when evaluating 'strategy' for job 'Request'. .github/workflows/RequestWagoData.yml (Line: 67, Col: 19): Error parsing fromJson,.github/workflows/RequestWagoData.yml (Line: 67, Col: 19): Error parsing fromJson,.github/workflows/RequestWagoData.yml (Line: 67, Col: 19): Error reading JToken from JsonReader. Path '', line 0, position 0.,.github/workflows/RequestWagoData.yml (Line: 67, Col: 19): Unexpected value ''
我猜测问题源于换行符,已参考多篇Stack Overflow文章尝试多种方法,但仍无法解决。完整工作流代码位于.github/workflows/RequestWagoData.yml。
内容的提问来源于stack exchange,提问作者Jods

