diff --git a/utils/find-first/action.yaml b/utils/find-first/action.yaml index cd2e92a..d6584a8 100644 --- a/utils/find-first/action.yaml +++ b/utils/find-first/action.yaml @@ -72,6 +72,14 @@ runs: - name: "Extract information about first file." id: extract run: | + NAME="Find First" + echo "::group::$NAME - Inputs" + echo "${{ toJSON(inputs) }}" + echo "::endgroup::" + bash "${{ github.action_path }}/find-first.sh" "${{ steps.find.outputs.files }}" + + echo "::group::$NAME - Outputs" cat "$GITHUB_OUTPUT" + echo "::endgroup::" shell: bash diff --git a/utils/find/action.yaml b/utils/find/action.yaml index 99bc2d1..799f55b 100644 --- a/utils/find/action.yaml +++ b/utils/find/action.yaml @@ -45,6 +45,15 @@ runs: - name: "Find files." id: find run: | + NAME="Find" + echo "::group::$NAME - Inputs" + echo "${{ toJSON(inputs) }}" + echo "::endgroup::" + bash "${{ github.action_path }}/find.sh" "${{ inputs.path }}" "${{ inputs.pattern }}" "${{ inputs.type }}" \ "${{ inputs.maxDepth }}" "${{ inputs.minDepth }}" "${{ inputs.size }}" "${{ inputs.modified }}" "${{ inputs.additionalArgs }}" + + echo "::group::$NAME - Outputs" + cat "$GITHUB_OUTPUT" + echo "::endgroup::" shell: bash diff --git a/utils/find/find.sh b/utils/find/find.sh index d8a8d84..1b921ed 100644 --- a/utils/find/find.sh +++ b/utils/find/find.sh @@ -18,11 +18,6 @@ fi # Build the find command - start with basic find and path FIND_CMD="find \"$SEARCH_PATH\"" -if [[ -n "$FILE_TYPE" ]]; then - # Add type filter first - FIND_CMD="$FIND_CMD -type $FILE_TYPE" -fi - # Add depth constraints before name pattern if [[ -n "$MAX_DEPTH" ]]; then FIND_CMD="$FIND_CMD -maxdepth $MAX_DEPTH" @@ -32,6 +27,11 @@ if [[ -n "$MIN_DEPTH" ]]; then FIND_CMD="$FIND_CMD -mindepth $MIN_DEPTH" fi +if [[ -n "$FILE_TYPE" ]]; then + # Add type filter first + FIND_CMD="$FIND_CMD -type $FILE_TYPE" +fi + # Add name pattern FIND_CMD="$FIND_CMD -name \"$PATTERN\""