Refactor code to extract all tags from JSON

Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
This commit is contained in:
Shakar Bakr 2024-03-06 13:36:36 +03:00
parent bce021de3a
commit 66b6967fe6
No known key found for this signature in database
GPG Key ID: DA55A26823AE3C28

View File

@ -92,8 +92,8 @@ runs:
# extracted_element="${my_array[$index_to_extract]}" # extracted_element="${my_array[$index_to_extract]}"
# echo "Extracted element: $extracted_element" # echo "Extracted element: $extracted_element"
jsonOutput=$(echo "$json" | jq -r '.tags | .[0]') jsonOutput=$(echo "$json" | jq -r '.tags')
echo "jsonOutput: $jsonOutput" echo "jsonOutput: ${jsonOutput}"
echo "jsonOutput: ${jsonOutput[0]}" echo "jsonOutput: ${jsonOutput[0]}"
echo "tag=$extracted_element" >> $GITHUB_OUTPUT echo "tag=$extracted_element" >> $GITHUB_OUTPUT