1717from .utils .network import dl2 , get_gh_repo_last_releases , request_get , wait_dl_tasks
1818from .utils .openwrt import OpenWrt
1919from .utils .paths import paths
20- from .utils .repo import compiler , user_repo , get_release_suffix
20+ from .utils .repo import compiler , get_release_suffix , user_repo
2121from .utils .upload import uploader
2222from .utils .utils import parse_config
2323
@@ -31,7 +31,7 @@ def parse_configs() -> dict[str, dict[str, Any]]:
3131 configs : dict [str , dict ] = {}
3232 for name , path in paths .configs .items ():
3333 logger .info ("解析配置: %s" , name )
34- configs [name ] = {"path" : path }
34+ configs [name ] = {"path" : path , "name" : name }
3535 k_config_path = os .path .join (path , "OpenWrt-K" )
3636 if not os .path .isdir (k_config_path ):
3737 msg = f"未找到配置{ name } 的openwrt文件夹: { k_config_path } "
@@ -84,7 +84,6 @@ def parse_configs() -> dict[str, dict[str, Any]]:
8484def get_matrix (configs : dict [str , dict ]) -> str :
8585 matrix = {"include" : []}
8686 for name , config in configs .items ():
87- config ["name" ] = name
8887 matrix ["include" ].append ({"name" : name , "config" : gzip .compress (json .dumps (config , separators = (',' , ':' )).encode ("utf-8" )).hex ().upper ()})
8988 return json .dumps (matrix )
9089
0 commit comments