This commit is contained in:
2025-06-28 23:26:40 -07:00
parent 779af87acf
commit 847fd60ff3
3 changed files with 22 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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\""