Skip to content

Commit a5f767c

Browse files
authored
Add copy-only flag for blog previews
2 parents 86eddc6 + edc59a4 commit a5f767c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ inputs:
3434
default: "true"
3535
type: boolean
3636
description: "If true, the files will be marked as temporary and deleted after 14 days. Otherwise they will persist in S3 indefinitely."
37+
copy-only:
38+
required: false
39+
default: "false"
40+
type: boolean
41+
description: "If true, uses rclone copy instead of sync. The files will be copied to the destination without affecting the existing files that do not exist in the source."
3742
```
3843
3944
## Example

action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ inputs:
2424
default: "true"
2525
type: boolean
2626
description: "If true, the files will be marked as temporary and deleted after 14 days. Otherwise they will persist in S3 indefinitely."
27+
copy-only:
28+
required: false
29+
default: "false"
30+
type: boolean
31+
description: "If true, uses rclone copy instead of sync. The files will be copied to the destination without affecting the existing files that do not exist in the source."
2732

2833
runs:
2934
using: "composite"
@@ -49,4 +54,4 @@ runs:
4954
# Check temporary != 'false' so any other value is marked as temporary since there's no actual validation of boolean or required inputs
5055
# The production bucket doesn't have a lifecycle rule, so omitting temporary just results in a tag on files. They won't actually be deleted
5156
run: |
52-
rclone sync --fast-list --checksum ${{ inputs.source }} :s3:${{ inputs.production == 'true' && 'deephaven-docs' || 'deephaven-docs-preview' }}/${{ inputs.destination }} ${{ inputs.temporary != 'false' && '--header-upload "x-amz-tagging: temporary=true"' || '' }}
57+
rclone ${{ inputs.copy-only == 'true' && 'copy' || 'sync' }} --fast-list --checksum ${{ inputs.source }} :s3:${{ inputs.production == 'true' && 'deephaven-docs' || 'deephaven-docs-preview' }}/${{ inputs.destination }} ${{ inputs.temporary != 'false' && '--header-upload "x-amz-tagging: temporary=true"' || '' }}

0 commit comments

Comments
 (0)