From abfa8fb368e0ad6d43128ee4145090ae02808733 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 30 Jul 2024 15:43:42 +0200 Subject: [PATCH] Escape JSON? --- .github/workflows/run-zombienet-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-zombienet-tests.yml b/.github/workflows/run-zombienet-tests.yml index 768d7b63d..31f6d6df9 100644 --- a/.github/workflows/run-zombienet-tests.yml +++ b/.github/workflows/run-zombienet-tests.yml @@ -70,7 +70,8 @@ jobs: - name: Set tests output id: set_tests run: | - include_tests=$(echo "${{ env.tests }}" | jq -c '{include: . | map({test_name: .})}') + tests_escaped=$(echo "${{ env.tests }}" | jq @json) + include_tests=$(echo "$tests_escaped" | jq -nc --argjson tests "$tests_escaped" '{include: $tests | map({test_name: .})}') echo "Formatted tests JSON: $include_tests" echo "tests=$include_tests" >> $GITHUB_OUTPUT