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.
This commit is contained in:
Erik Sundell
2022-11-14 13:26:59 +01:00
parent b1b2b3772f
commit 27dba29e04

View File

@@ -50,9 +50,9 @@ jobs:
matrix_post_filter=$( matrix_post_filter=$(
echo "$matrix_include_pre_filter" \ echo "$matrix_include_pre_filter" \
| yq e --output-format=json '.' - \ | 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 "The subsequent job's matrix are:"
echo $matrix_post_filter | jq '.' echo $matrix_post_filter | jq '.'