Skip to content

Commit 502e7de

Browse files
committed
fix: outputting matrix
1 parent f0eee7e commit 502e7de

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/pi_build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
env:
2121
PYTHON_VERSION: ${{ vars.PYTHON_VERSION }}
2222
outputs:
23-
matrix: ${{ steps.get-diff.outputs.matrix }}
23+
parent_image_type: ${{ steps.get-diff.outputs.parent_image_type }}
24+
include: ${{ steps.get-diff.outputs.include }}
2425
steps:
2526
- name: Checkout Repository
2627
uses: actions/checkout@v4
@@ -49,7 +50,9 @@ jobs:
4950
env:
5051
PYTHON_VERSION: ${{ vars.PYTHON_VERSION }}
5152
strategy:
52-
matrix: ${{ fromJson(needs.pi-diff.outputs.matrix) }}
53+
matrix:
54+
parent_image_type: ${{ fromJson(needs.pi-diff.outputs.parent_image_type) }}
55+
include: ${{ fromJson(needs.pi-diff.outputs.include) }}
5356
steps:
5457
- name: Print matrix values - ${{ matrix.parent_image_type }}
5558
run: echo "${{ toJson(matrix) }}"

pi/diff.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ for parent_image_type in "${UPDATED_PARENT_TYPES[@]}"; do
3838
done
3939

4040
MATRIX='{"parent_image_type": ['${PARENT_IMAGE_TYPES::-1}'],"include": ['${INCLUDES::-1}']}'
41-
echo $MATRIX | jq -c --indent 2 '.'
42-
echo "matrix='$MATRIX'" >> $GITHUB_OUTPUT
41+
echo $MATRIX | jq -C --indent 2 '.'
42+
echo "parent_image_type='[${PARENT_IMAGE_TYPES::-1}]'" >> $GITHUB_OUTPUT
43+
echo "include='[${INCLUDES::-1}]'" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)