Skip to content

Added option of sync-delta-includes to allow adding files which are added through a build process in the workflow. #43

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ inputs:
sync-delta-excludes:
description: "Files to exclude from delta sync"
required: false
sync-delta-includes:
description: "Files to include into delta sync"
required: false
ssh-options:
description: "Additional command arguments for SSH client"
required: false
Expand Down Expand Up @@ -323,9 +326,17 @@ runs:
git diff --diff-filter=ACMRT --name-only ${git_previous_commit}..${{github.sha}} -- ${local_path_unslash} ':!/.git*' ${{inputs.sync-delta-excludes}} > ~/files_to_upload
git diff-tree --diff-filter=D --name-only -t ${git_previous_commit}..${{github.sha}} -- ${local_path_unslash} ':!/.git*' ${{inputs.sync-delta-excludes}} > ~/files_to_delete

# Assuming inputs.sync-delta-includes is a space-separated list of patterns
# ${{inputs.sync-delta-includes}} >> ~/files_to_upload
for pattern in ${{inputs.sync-delta-includes}}; do
find "$pattern" -type f >> ~/files_to_upload
done

sed --in-place --regexp-extended "s#(.*)#realpath --canonicalize-missing --relative-to=$local_path_unslash \1#e" ~/files_to_upload
sed --in-place --regexp-extended "s#(.*)#realpath --canonicalize-missing --relative-to=$local_path_unslash \1#e" ~/files_to_delete



echo "File created: ~/files_to_upload" && cat ~/files_to_upload && show_hr
echo "File created: ~/files_to_delete" && cat ~/files_to_delete && show_hr

Expand Down