Skip to content

Commit 4df657d

Browse files
committed
chore: action update and cleaning
1 parent 970f533 commit 4df657d

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This GitHub Action copies a file from the current repository to a location in an
2424
user_email: 'example@email.com'
2525
user_name: 'bonus83'
2626
commit_message: 'A custom message for the commit'
27-
commit_tag: 'V2.0'
27+
commit_tag: 'V2.0'
2828

2929
# Variables
3030

@@ -39,7 +39,6 @@ The `API_TOKEN_GITHUB` needs to be set in the `Secrets` section of your reposito
3939
* destination_branch_create: [optional] A branch to be created with this commit, defaults to commiting in `destination_branch`
4040
* commit_message: [optional] A custom commit message for the commit. Defaults to `Update from https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}`
4141
* commit_tag: [optional] A custom tag to the commit.
42-
* use_rsync: [optional] Uses `rsync -avh` instead of `cp -R` to perform the base operation. Currently works as an experimental feature (due to lack of testing) but can speed up updates to large collections of files with many small changes by only syncing the changes and not copying the entire contents again. Please understand your use case before using this, and provide feedback as issues if needed.
4342

4443
# Behavior Notes
4544
The action will create any destination paths if they don't exist. It will also overwrite existing files if they already exist in the locations being copied to. It will not delete the entire destination repository.

action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ inputs:
3131
rename:
3232
description: 'Rename the destination file'
3333
required: false
34-
use_rsync:
35-
description: 'Copy files/directories using rsync instead of cp. Experimental feature, please know your use case'
36-
required: false
3734
git_server:
3835
description: 'Git server host, default github.com'
3936
required: false
@@ -51,7 +48,6 @@ runs:
5148
- ${{ inputs.commit-message }}
5249
- ${{ inputs.git-server }}
5350
- ${{ inputs.rename }}
54-
- ${{ inputs.use-rsync }}
5551
- ${{ inputs.commit-tag }}
5652
branding:
5753
icon: 'git-commit'

entrypoint.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,7 @@ fi
3737

3838
echo "Copying contents to git repo"
3939
mkdir -p $CLONE_DIR/$INPUT_DESTINATION_FOLDER
40-
if [ -z "$INPUT_USE_RSYNC" ]
41-
then
42-
cp -R "$INPUT_SOURCE_FILE" "$DEST_COPY"
43-
else
44-
echo "rsync mode detected"
45-
rsync -avrh --delete "$INPUT_SOURCE_FILE" "$DEST_COPY"
46-
fi
40+
rsync -avrh --delete --exclude=".git" "$INPUT_SOURCE_FILE" "$DEST_COPY"
4741

4842
echo "Switch to clone dir"
4943
cd "$CLONE_DIR"

0 commit comments

Comments
 (0)