Skip to content

Commit 4895285

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 4895285

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,8 +57,8 @@ 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"
6160
local version_branch="v$VERSION"
61+
local workflow_runs_url="repos/:owner/:repo/actions/workflows/ci.yaml/runs?event=pull_request&branch=$version_branch"
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
6464
echo >&2 "ERROR: artifacts_url came back empty"

0 commit comments

Comments
 (0)