Skip to content

Commit

Permalink
fix(sync-files): keep original source file intact (#297)
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 10, 2024
1 parent dcd51f2 commit a6f96e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sync-files/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ runs:
pre_commands=$(yq ".pre-commands" /tmp/file-config.yaml)
post_commands=$(yq ".post-commands" /tmp/file-config.yaml)
modified_source_path="/tmp/repository/$source_path"
full_source_path="/tmp/repository/$source_path"
modified_source_path=$(mktemp)
cp "$full_source_path" "$modified_source_path"
pre_commands=$(echo "$pre_commands" | sed "s|{source}|$modified_source_path|g" | sed "s|{dest}|$dest_path|g")
post_commands=$(echo "$post_commands" | sed "s|{source}|$modified_source_path|g" | sed "s|{dest}|$dest_path|g")
Expand Down

0 comments on commit a6f96e7

Please sign in to comment.