mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Correct run-id evaluation
This commit is contained in:
parent
b2c3e10335
commit
1b321efa30
@ -119,18 +119,18 @@ if [ -z "$head_sha" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z ${run_id} ]]; then
|
||||
# Determine run_id from head_sha
|
||||
runs=$(request_call "$api_url/actions/runs")
|
||||
run_id=$(echo "$runs" | tr '\r\n' ' ' | python3 -c """
|
||||
import json,sys
|
||||
data = json.load(sys.stdin)
|
||||
if [ -z "$run_id" ]; then
|
||||
# Determine run_id from head_sha
|
||||
runs=$(request_call "$api_url/actions/runs")
|
||||
run_id=$(echo "$runs" | tr '\r\n' ' ' | python3 -c """
|
||||
import json,sys
|
||||
data = json.load(sys.stdin)
|
||||
|
||||
for i in data['workflow_runs']:
|
||||
if i['head_sha'] == '"$head_sha"':
|
||||
print(i['id'])
|
||||
break
|
||||
""" 2>/dev/null)
|
||||
for i in data['workflow_runs']:
|
||||
if i['head_sha'] == '"$head_sha"':
|
||||
print(i['id'])
|
||||
break
|
||||
""" 2>/dev/null)
|
||||
fi
|
||||
|
||||
if [ -z "$run_id" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user