修复:将 git push 的目标分支从 HEAD 更改为 main
This commit is contained in:
@@ -70,7 +70,7 @@ def main():
|
||||
commit_message = "自动更新:从 list.yaml 下载最新文件"
|
||||
# 如果没有变更,则 git commit 会返回非零状态,可用 || true 处理
|
||||
subprocess.run(["git", "commit", "-m", commit_message], check=False)
|
||||
subprocess.run(["git", "push", "origin", "HEAD"], check=True)
|
||||
subprocess.run(["git", "push", "origin", "main"], check=True)
|
||||
else:
|
||||
print("没有需要更新的文件。")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user