Skip to content

Commit

Permalink
Fix possibly unwanted execution UpdateBuildOutputs and `RegisterGCR…
Browse files Browse the repository at this point in the history
…oots` for PR branches

Signed-off-by: magic_rb <[email protected]>
  • Loading branch information
MagicRB committed Oct 31, 2024
1 parent f7a057b commit 6e63e22
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions buildbot_nix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ async def run(self) -> int:

if not self.branch_config.do_copy_outputs(
self.project.default_branch, props.getProperty("branch")
):
) or props.getProperty("event") != "push":
return util.SKIPPED

out_path = props.getProperty("out_path")
Expand Down Expand Up @@ -955,10 +955,10 @@ async def do_register_gcroot_if(
out_path = await s.getProperty("out_path")

return branch_config.do_register_gcroot(
s.getProperty("default_branch"), s.getProperty("branch")
) and not (
Path(str(gc_root)).exists() and Path(str(gc_root)).readlink() == str(out_path)
)
await s.getProperty("default_branch"), await s.getProperty("branch")
) and await s.getProperty("event") == "push" \
and not Path(str(gc_root)).exists() and Path(str(gc_root)).readlink() == str(out_path)



def nix_build_steps(
Expand Down

0 comments on commit 6e63e22

Please sign in to comment.