Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Aug 16, 2024
1 parent 4daa16a commit 6686137
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ runs:
executed_jobs="$(jq '[.[] | {id, name, conclusion}]' <<<"${executed_jobs:?}")"
jq --version
jq -s '.' <<<"${artifact_jobs:?}" <<<"${executed_jobs:?}")"
jq -s '.[0] as $aj | .[1] as $ej | INDEX($ej[]; .id)' <<<"${artifact_jobs:?}" <<<"${executed_jobs:?}")"
# Combine the `executed_jobs` into the `artifact_jobs` data (left join) to produce list of jobs in the matrix.
# For more info on `jq`'s SQL style JOIN see: https://qmacro.org/blog/posts/2022/06/23/understanding-jq%27s-sql-style-operators-join-and-index/
matrix_jobs="$(jq -s '.[0] as $aj | .[1] as $ej | JOIN(INDEX($ej[]; .id); $aj[]; (.id | tostring); add)' <<<"${artifact_jobs:?}" <<<"${executed_jobs:?}")"
num_jobs="$(jq length <<<"${matrix_jobs}")"
Expand Down

0 comments on commit 6686137

Please sign in to comment.