Skip to content

Commit

Permalink
update workflow-tester95
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeFalourd committed May 10, 2024
1 parent 559b651 commit 378cde6
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/workflow-tester95.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 378cde6

Please sign in to comment.