From 378cde6dbbbc5fee696b1bd0756910c8c93c4c0f Mon Sep 17 00:00:00 2001 From: GuillaumeFalourd Date: Fri, 10 May 2024 16:55:49 -0300 Subject: [PATCH] update workflow-tester95 --- .github/workflows/workflow-tester95.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow-tester95.yml b/.github/workflows/workflow-tester95.yml index 4887531759..cde8526e2d 100644 --- a/.github/workflows/workflow-tester95.yml +++ b/.github/workflows/workflow-tester95.yml @@ -34,12 +34,23 @@ jobs: steps: - id: set-matrix run: | - input_replay="${{ inputs.stsReplay }}" - echo "input_replay: $input_replay" - values=$(echo "${REPLAY_MAP_JSON}" | jq -r --arg input_replay "$input_replay" '.[$input_replay]') - echo "values: $values" - myArray=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${values[@]}") - echo "$myArray" + # Initialize an empty array + myArray=() + + # Get the array associated with the current key + players=$(jq -r '."${{ inputs.stsReplay }}"[]' <<< "$ENV_JSON") + + # Add each player to myArray + while IFS= read -r player; do + myArray+=("\"$player\"") + done <<< "$players" + + + # Convert myArray to a JSON array using jq + myArray=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${myArray[@]}") + + # Output the updated tasks list + echo "Updated tasks list: $myArray" echo "values=$myArray" >> "$GITHUB_OUTPUT" job2: