Skip to content

Commit

Permalink
chore: Fix releaser to properly wait for builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jan 13, 2025
1 parent ac1a16e commit c3922d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/create_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ def stage_await_master_build(config: Config, version: str) -> None:
) as s:
for _ in range(20): # 20 * 30s = 10 minutes
head_sha = git.branch_sha(config.main_branch)
builds = github.action_runs(config.main_branch, head_sha)
builds = [
run for run in github.action_runs(config.main_branch, head_sha)
if run.path == ".github/workflows/build-test-deploy.yaml"
]
if not builds:
s.progress(
f"Waiting for builds to start for {config.main_branch}")
Expand Down Expand Up @@ -482,7 +485,10 @@ def stage_build_binaries(config: Config, version: str) -> None:
"Waiting for binaries to be built") as s:
for _ in range(20): # 20 * 30s = 10 minutes
head_sha = git.branch_sha(version)
builds = github.action_runs(version, head_sha)
builds = [
run for run in github.action_runs(version, head_sha)
if run.path == ".github/workflows/build-test-deploy.yaml"
]
if not builds:
s.progress("Waiting for builds to start for "
f"{version} @ {head_sha}")
Expand Down
2 changes: 2 additions & 0 deletions tools/lib/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ class ActionRun:
status: str
conclusion: str
html_url: str
path: str

@staticmethod
def fromJSON(run: dict[str, Any]) -> "ActionRun":
Expand All @@ -415,6 +416,7 @@ def fromJSON(run: dict[str, Any]) -> "ActionRun":
status=str(run["status"]),
conclusion=str(run["conclusion"]),
html_url=str(run["html_url"]),
path=str(run["path"]),
)


Expand Down

0 comments on commit c3922d6

Please sign in to comment.