From 8d24c7f51483451d840e5b358cfa696683ff136c Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Tue, 13 Aug 2024 14:11:02 -0500 Subject: [PATCH] fixup! Refactor --- job-name/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/job-name/action.yaml b/job-name/action.yaml index 4dcc3cf..002f5e6 100644 --- a/job-name/action.yaml +++ b/job-name/action.yaml @@ -81,7 +81,7 @@ runs: set -euo pipefail set -x jobs="$(gh api -X GET "/repos/{owner}/{repo}/actions/runs/${run_id:?}/attempts/${run_attempt:?}/jobs")" - job_ids="$(jq -c --arg name "$job_name" '[.jobs | select(.name == $name) | .id]')" + job_ids="$(jq -c --arg name "$job_name" '[.jobs[] | select(.name == $name) | .id]')" echo "job-ids=${job_ids:?}" | tee -a "$GITHUB_OUTPUT" if [[ $(jq length <<<"${job_ids}") -eq 1 ]]; then