[ci] $GITHUB_JOB is the name, not the id. extract id from api call

This commit is contained in:
Chris 2025-05-06 16:48:13 -06:00
parent e0e53beeba
commit 8f15caba94

View File

@ -13,9 +13,10 @@ log "$api_url"
job=$(gh api "$api_url" --jq ".jobs[] | select(.name==\"$job_name\")")
[[ -z "$job" ]] && { log "Job '$job_name' not found"; exit 1; }
job_id=$(echo "$job" | jq -r .id)
run_url=$(echo "$job" | jq -r .html_url)
checksum_number=$(echo "$job" | jq ".steps[] | select(.name==\"$step_name\") | .number")
[[ -z "$checksum_number" ]] && { log "Step '$step_name'.number not found"; exit 1; }
echo "checksum_url=$run_url#step:$checksum_number:1"
echo "job_id=$GITHUB_JOB"
echo "job_id=$job_id"