diff --git a/.gitea/workflows/actions/discover-skins/action.yml b/.gitea/workflows/actions/discover-skins/action.yml index f4c0a87..dec5514 100644 --- a/.gitea/workflows/actions/discover-skins/action.yml +++ b/.gitea/workflows/actions/discover-skins/action.yml @@ -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<> "$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<> "$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<> "$GITHUB_OUTPUT" fi echo ""