File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ github() {
11
11
curl --header " authorization: Bearer $GITHUB_TOKEN " " $@ "
12
12
}
13
13
14
- latest_run=$( github " ${gh_api} /repos/${repository} /actions/workflows/${workflow_name} /runs?branch=${branch} &status=completed" | jq ' .workflow_runs | sort_by(.run_number) | last' )
14
+ latest_run=$( github " ${gh_api} /repos/${repository} /actions/workflows/${workflow_name} /runs?head_branch=${branch} &status=completed&conclusion=success" \
15
+ | jq " .workflow_runs | map(select(.head_branch == \" $branch \" )) | sort_by(.run_number) | last" )
15
16
artifacts_url=$( echo $latest_run | jq .artifacts_url --raw-output)
16
17
head_sha=$( echo $latest_run | jq .head_sha --raw-output)
17
18
18
-
19
19
get_artifact_url () {
20
20
local name=$1
21
21
github $artifacts_url --fail | jq " .artifacts[] | select(.name == \" $name \" ) | .archive_download_url" | sed ' s/\"//g'
You can’t perform that action at this time.
0 commit comments