fix: improve JSON format with awk and add matrix debug output
This commit is contained in:
@@ -59,8 +59,8 @@ jobs:
|
|||||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||||
echo "image_list=[]" >> $GITHUB_OUTPUT
|
echo "image_list=[]" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
# Convert to JSON array - simple approach
|
# Format JSON avec awk pour être sûr
|
||||||
JSON="[$(echo "$IMAGES" | sed 's/,/","/g' | sed 's/^/"/' | sed 's/$/"/' )]"
|
JSON=$(printf '%s\n' "$IMAGES" | tr ',' '\n' | awk '{printf "\"%s\",", $0}' | sed 's/,$//' | sed 's/^/[/' | sed 's/$/]/')
|
||||||
echo "JSON: $JSON"
|
echo "JSON: $JSON"
|
||||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||||
echo "image_list=$JSON" >> $GITHUB_OUTPUT
|
echo "image_list=$JSON" >> $GITHUB_OUTPUT
|
||||||
@@ -77,6 +77,11 @@ jobs:
|
|||||||
image: ${{ fromJson(needs.detect-changes.outputs.image_list) }}
|
image: ${{ fromJson(needs.detect-changes.outputs.image_list) }}
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
|
- name: Debug matrix
|
||||||
|
run: |
|
||||||
|
echo "Matrix image value: '${{ matrix.image }}'"
|
||||||
|
echo "All matrix: ${{ toJson(matrix) }}"
|
||||||
|
|
||||||
- name: Install git and checkout
|
- name: Install git and checkout
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache git
|
apk add --no-cache git
|
||||||
|
|||||||
Reference in New Issue
Block a user