fix: fetch target commit into cached workspace

This commit is contained in:
hy 2026-04-22 21:55:24 +08:00
parent 6533fefaf1
commit 29b136c734

View File

@ -432,6 +432,12 @@ def prepare_persistent_build_workspace(
label=f"{label} fetch build workspace",
timeout_seconds=300,
)
local_command_output(
["git", "-C", str(workspace_root), "fetch", "origin", commit],
cwd=workspace_root,
label=f"{label} fetch build workspace commit",
timeout_seconds=300,
)
local_command_output(
["git", "-C", str(workspace_root), "reset", "--hard", commit],
cwd=workspace_root,