From 27dba29e049b8b509a41cc377ad942ab56d684b3 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 14 Nov 2022 13:26:59 +0100 Subject: [PATCH 1/2] ci: fix deprecation of set-output in github workflows The -c flag on jq was used to emit JSON on a single line instead of ending up with multi-line output, which would make it harder to pass as output to an environment variable. --- .github/workflows/integration-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index a0cf9fa..c1d8e16 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -50,9 +50,9 @@ jobs: matrix_post_filter=$( echo "$matrix_include_pre_filter" \ | yq e --output-format=json '.' - \ - | jq '{"include": map( . | select(.dont_run_on_ref != "${{ github.ref }}" ))}' + | jq -c '{"include": map( . | select(.dont_run_on_ref != "${{ github.ref }}" ))}' ) - echo ::set-output name=matrix::$(echo "$matrix_post_filter") + echo "matrix=$matrix_post_filter" >> $GITHUB_OUTPUT echo "The subsequent job's matrix are:" echo $matrix_post_filter | jq '.' From 3275fb7637dfdcc24d9633726e34a5e505dd766e Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 14 Nov 2022 14:19:33 +0100 Subject: [PATCH 2/2] ci: colorize output of jq --- .github/workflows/integration-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index c1d8e16..cee1049 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -55,7 +55,7 @@ jobs: echo "matrix=$matrix_post_filter" >> $GITHUB_OUTPUT echo "The subsequent job's matrix are:" - echo $matrix_post_filter | jq '.' + echo $matrix_post_filter | jq -C '.' env: matrix_include_pre_filter: | - name: "Int. tests: Ubuntu 18.04, Py 3.6"