Skip to content

Commit

Permalink
feat(sync-files): allow multiple destinations and speed up clone (#295)
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
xmfcx authored Jun 7, 2024
1 parent 3f59aa0 commit dcd51f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sync-files/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ runs:
fi
rm -rf /tmp/repository
git clone "$repository" /tmp/repository ${git_options[@]}
git clone --depth 1 "$repository" /tmp/repository ${git_options[@]}
for source_file in $(yq ".files[].source" /tmp/repo-config.yaml); do
yq ".files[] | select(.source == \"$source_file\")" /tmp/repo-config.yaml > /tmp/file-config.yaml
for file_config in $(yq ".files[].dest" /tmp/repo-config.yaml); do
yq ".files[] | select(.dest == \"$file_config\")" /tmp/repo-config.yaml > /tmp/file-config.yaml
source_path=$(yq ".source" /tmp/file-config.yaml)
dest_path=$(yq ".dest" /tmp/file-config.yaml)
Expand Down

0 comments on commit dcd51f2

Please sign in to comment.