Skip to content

Commit 9ad305d

Browse files
committed
Query artifacts by branch name
This way workflows will still work even if there have been enough runs to push the version branch run off the first page.
1 parent ff3b188 commit 9ad305d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ arch() {
5757
# https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs
5858
get_artifacts_url() {
5959
local artifacts_url
60-
local workflow_runs_url="repos/:owner/:repo/actions/workflows/ci.yaml/runs?event=pull_request"
60+
local workflow_runs_url="repos/:owner/:repo/actions/workflows/ci.yaml/runs?event=pull_request&branch=$version_branch"
6161
local version_branch="v$VERSION"
6262
artifacts_url=$(gh api "$workflow_runs_url" | jq -r ".workflow_runs[] | select(.head_branch == \"$version_branch\") | .artifacts_url" | head -n 1)
6363
if [[ -z "$artifacts_url" ]]; then

0 commit comments

Comments
 (0)