Added find and find-first.
This commit is contained in:
50
utils/find/action.yaml
Normal file
50
utils/find/action.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
name: find
|
||||
description: "Find files matching a specific pattern."
|
||||
inputs:
|
||||
path:
|
||||
description: "Path to search in."
|
||||
required: false
|
||||
default: "."
|
||||
pattern:
|
||||
description: "Pattern to search for (supports glob patterns)."
|
||||
required: true
|
||||
type:
|
||||
description: "Type of files to find (f=files, d=directories, l=links)."
|
||||
required: false
|
||||
default: "f"
|
||||
maxDepth:
|
||||
description: "Maximum depth to search."
|
||||
required: false
|
||||
default: ""
|
||||
minDepth:
|
||||
description: "Minimum depth to search."
|
||||
required: false
|
||||
default: ""
|
||||
size:
|
||||
description: "Size constraint (e.g., +100k, -1M)."
|
||||
required: false
|
||||
default: ""
|
||||
modified:
|
||||
description: "Modified time constraint (e.g., -1, +7)."
|
||||
required: false
|
||||
default: ""
|
||||
additionalArgs:
|
||||
description: "Additional arguments to pass to find command."
|
||||
required: false
|
||||
default: ""
|
||||
outputs:
|
||||
files:
|
||||
description: "List of found files (newline separated)."
|
||||
value: ${{ steps.find.outputs.files }}
|
||||
count:
|
||||
description: "Number of files found."
|
||||
value: ${{ steps.find.outputs.count }}
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Find files."
|
||||
id: find
|
||||
run: |
|
||||
bash "${{ github.action_path }}/find.sh" "${{ inputs.path }}" "${{ inputs.pattern }}" "${{ inputs.type }}" \
|
||||
"${{ inputs.maxDepth }}" "${{ inputs.minDepth }}" "${{ inputs.size }}" "${{ inputs.modified }}" "${{ inputs.additionalArgs }}"
|
||||
shell: bash
|
||||
Reference in New Issue
Block a user