Skip to content

Commit

Permalink
Use fd for file search
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeglius committed Dec 7, 2024
1 parent 9360bfd commit 6709ea9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/upload_sysext/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ runs:
- name: setup-oras
uses: oras-project/[email protected]

- name: Setup fd
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y fd-find
sudo ln -s $(which fdfind) ~/.local/bin/fd
- name: Find input files
shell: bash
id: find-files
Expand All @@ -29,7 +36,7 @@ runs:
paths_patterns='${{ inputs.raw-files }}'
paths_resolved=""
for path in $paths_patterns; do
paths_resolved="${path_resolved} $(sudo find . -maxdepth 1 -type f -name "$path" -exec realpath {} \;)"
paths_resolved="${path_resolved} $(fd --max-depth 2 -Itf -g -p -a "$path")"
done
paths_resolved=$(echo "$paths_resolved" | tr ' ' '\n' | sort -u)
echo "paths='$paths_resolved'" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 6709ea9

Please sign in to comment.