Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sync-files): allow multiple destinations and speed up clone #295

Merged
merged 4 commits into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading