[fix] 修复pushUrl未配置相关Secrets报错

之前的修复版本未考虑充分,这次从yml中进行空值判断
This commit is contained in:
Ghlerrix
2023-09-02 15:41:10 +08:00
parent e071c8f6c0
commit 22308fd069

View File

@@ -89,15 +89,9 @@ if __name__ == '__main__':
# 推送bing
if args.bing_api_key:
push_to_bing(args.url, urls, args.bing_api_key)
else:
print('未配置 Bing API Key')
print('详情参见: https://ghlcode.cn/fe032806-5362-4d82-b746-a0b26ce8b9d9')
# 推送百度
if args.baidu_token:
push_to_baidu(args.url, urls, args.baidu_token)
else:
print('未配置 Baidu Token')
print('详情参见: https://ghlcode.cn/fe032806-5362-4d82-b746-a0b26ce8b9d9')
else:
print('请前往 Github Action Secrets 配置 URL')
print('详情参见: https://ghlcode.cn/fe032806-5362-4d82-b746-a0b26ce8b9d9')