This commit is contained in:
2025-10-01 13:59:07 +02:00
parent 99f38f84e3
commit 89efc8a313

View File

@@ -31,8 +31,15 @@ runs:
find "$SKINS_DIR" -mindepth 1 -maxdepth 1 -type d \
| sed 's|'"$SKINS_DIR"'/||'
)
json=$(printf '%s\n' "${skins[@]}" | jq -R . | jq -s .)
echo "all_skins=$json" >> "$GITHUB_OUTPUT"
# Convert to compact JSON
json=$(printf '%s\n' "${skins[@]}" | jq -R . | jq -cs .)
{
echo "all_skins<<EOF"
echo "$json"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Detect Changed Skin Directories
id: detect
@@ -40,6 +47,7 @@ runs:
run: |
echo "[Detect Changed Skin Directories Started]"
# Parse JSON back into Bash array
readarray -t all_skins < <(echo '${{ steps.discover_all.outputs.all_skins }}' | jq -r '.[]')
force_rebuild="${{ inputs.force_rebuild }}"
@@ -115,13 +123,22 @@ runs:
echo ""
if [ "${#uniq_skins[@]}" -eq 0 ]; then
echo "→ No added/modified skins detected."
echo "changed_skins_file=" >> "$GITHUB_OUTPUT"
{
echo "changed_skins_file<<EOF"
echo ""
echo "EOF"
} >> "$GITHUB_OUTPUT"
else
echo "[Writing Changed Skins to File]"
changed_skins_file=$(mktemp)
printf "%s\n" "${uniq_skins[@]}" > "$changed_skins_file"
echo " ✓ Skins written to $changed_skins_file"
echo "changed_skins_file=$changed_skins_file" >> "$GITHUB_OUTPUT"
{
echo "changed_skins_file<<EOF"
echo "$changed_skins_file"
echo "EOF"
} >> "$GITHUB_OUTPUT"
fi
echo ""