From 81a47c9b7ecfc44eed9d124bf9e001b1892ba656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 7 Jun 2024 16:34:42 +0300 Subject: [PATCH] iterate over .dest fields instead of .source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- sync-files/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync-files/action.yaml b/sync-files/action.yaml index b07ee868..607efe77 100644 --- a/sync-files/action.yaml +++ b/sync-files/action.yaml @@ -93,8 +93,8 @@ runs: rm -rf /tmp/repository 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 dest_file in $(yq ".files[].source" /tmp/repo-config.yaml); do + yq ".files[] | select(.dest == \"$dest_file\")" /tmp/repo-config.yaml > /tmp/file-config.yaml source_path=$(yq ".source" /tmp/file-config.yaml) dest_path=$(yq ".dest" /tmp/file-config.yaml)