Skip to content

Commit 4228de6

Browse files
committed
chore: simplify output format in detect-changes script and update condition in CD workflow
1 parent 0ffa8d3 commit 4228de6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/scripts/detect-changes.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ done
3030
echo "Found changed crates: ${changed_crates[*]}"
3131

3232
if [ ${#changed_crates[@]} -eq 0 ]; then
33-
echo "matrix={\"component\":[]}" >> "$GITHUB_OUTPUT"
33+
echo "matrix=[]" >> "$GITHUB_OUTPUT"
3434
else
3535
json_array=$(printf '"%s",' "${changed_crates[@]}" | sed 's/,$//')
36-
echo "matrix={\"component\":[$json_array]}" >> "$GITHUB_OUTPUT"
36+
echo "matrix=[$json_array]" >> "$GITHUB_OUTPUT"
3737
fi

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
publish:
3131
needs: detect-changes
32-
if: ${{ fromJson(needs.detect-changes.outputs.matrix).component != '[]' }}
32+
if: ${{ needs.detect-changes.outputs.matrix != '[]' }}
3333
runs-on: ubuntu-latest
3434
env:
3535
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)