From beb9723b2c52f8f2b4a29749ede5c6220b94157e Mon Sep 17 00:00:00 2001 From: Arlind Sulejmani Date: Wed, 1 Oct 2025 13:37:49 +0200 Subject: [PATCH] test --- .../actions/discover-skins/action.yml | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/actions/discover-skins/action.yml b/.gitea/workflows/actions/discover-skins/action.yml index b4cc8c6..ce5db2a 100644 --- a/.gitea/workflows/actions/discover-skins/action.yml +++ b/.gitea/workflows/actions/discover-skins/action.yml @@ -1,5 +1,6 @@ name: "Discover and Detect Skins" description: "Find all skins and detect which ones changed since last tag or based on inputs" + inputs: force_rebuild: description: "Force rebuild all skins" @@ -9,10 +10,20 @@ inputs: description: "Comma-separated list of skins to rebuild" required: false default: "" + +outputs: + changed_skins_file: + description: "Path to file containing changed skins" + value: ${{ steps.detect.outputs.changed_skins_file }} + all_skins: + description: "All discovered skins (newline-delimited list)" + value: ${{ steps.discover_all.outputs.all_skins }} + runs: using: "composite" steps: - name: Discover all skins + id: discover_all shell: bash run: | echo "Discovering all skins in $SKINS_DIR…" @@ -20,21 +31,22 @@ runs: find "$SKINS_DIR" -mindepth 1 -maxdepth 1 -type d \ | sed 's|'"$SKINS_DIR"'/||' ) + # Write all skins to output { - echo 'ALL_SKINS_DIR<> "$GITHUB_ENV" - echo "→ ALL_SKINS_DIR set (newline-delimited list)" + echo "EOF" + } >> "$GITHUB_OUTPUT" - name: Detect Changed Skin Directories + id: detect shell: bash run: | echo "[Detect Changed Skin Directories Started]" - readarray -t all_skins <<< "$ALL_SKINS_DIR" + readarray -t all_skins <<< "${{ steps.discover_all.outputs.all_skins }}" force_rebuild="${{ inputs.force_rebuild }}" target_skins="${{ inputs.target_skins }}" @@ -89,7 +101,6 @@ runs: else echo " ✓ No skins deleted" fi - else echo "→ No tag found. Falling back to ALL_SKINS_DIR for full list…" skins=("${all_skins[@]}") @@ -110,13 +121,13 @@ runs: echo "" if [ "${#uniq_skins[@]}" -eq 0 ]; then echo "→ No added/modified skins detected." - echo "CHANGED_SKINS_FILE=" >> "$GITHUB_ENV" + 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_ENV" + echo "changed_skins_file=$changed_skins_file" >> "$GITHUB_OUTPUT" fi echo ""