2 Commits

Author SHA1 Message Date
over-engineer f9a0ba3dc8 (#2) Introduce restoreMTime input 2024-01-19 16:22:59 +02:00
Konstantinos Pappas 9143083d7a Merge pull request #3 from pressidium/onlydifferent#2
Introduce the `onlyDifferent` input
2024-01-19 15:25:48 +02:00
3 changed files with 7 additions and 8 deletions
+1 -2
View File
@@ -59,8 +59,7 @@ jobs:
| `verifyCertificate` | Verify server’s certificate to be signed by a known Certificate Authority | No | `'true'` |
| `fingerprint` | Key fingerprint of the host we want to connect to | No | `''` |
| `onlyNewer` | Only transfer files that are newer than the ones on the remote server | No | `'true'` |
| `onlyDifferent` | Only transfer files that are different than the ones on the remote server | No | `'false'` |
| `restoreMTime` | Restore the modification time of the files (if necessary) | No | `'true'` |
| `restoreMTime` | Restore the modification time of the files | No | `'true'` |
| `parallel` | Number of parallel transfers | No | `'1'` |
| `settings` | Any additional lftp settings to configure | No | `''` |
| `localDir` | The local directory to copy from (assuming `reverse` is set to `true`) | No | `'.'` |
+3 -3
View File
@@ -31,10 +31,10 @@ inputs:
description: 'Only transfer files that are newer than the ones on the remote server'
required: false
default: 'true'
onlyDifferent:
description: 'Only transfer files that are different than the ones on the remote server'
restoreMTime:
description: 'Restore the modification time of the files'
required: false
default: 'false'
default: 'true'
parallel:
description: 'Number of parallel transfers'
required: false
+3 -3
View File
@@ -19,7 +19,7 @@
# - `INPUT_VERIFYCERTIFICATE` — Verify server's certificate to be signed by a known Certificate Authority
# - `INPUT_FINGERPRINT` — The key fingerprint of the host we want to connect to
# - `INPUT_ONLYNEWER` — Only transfer files that are newer than the ones on the remote server
# - `INPUT_ONLYDIFFERENT` — Only transfer files that are different than the ones on the remote server
# - `INPUT_RESTOREMTIME` - Restore the modification time of the files
# - `INPUT_PARALLEL` — Number of parallel transfers
# - `INPUT_SETTINGS` — Any additional lftp settings to configure
# - `INPUT_LOCALDIR` — The local directory to copy to (assuming `reverse` is set to `true`)
@@ -284,8 +284,8 @@ else
echo "Ignoring invalid value for the 'parallel' input: ${INPUT_PARALLEL}"
fi
# Restore timestamps if the `onlyNewer` or `onlyDifferent` input flag is set
if is_true "${INPUT_ONLYNEWER}" || is_true "${INPUT_ONLYDIFFERENT}"; then
# Restore timestamps if the `restoreMTime` input is set to `true`
if is_true "${INPUT_RESTOREMTIME}"; then
echo "Restoring the original modification time of files based on the date of the most recent commit..."
# Disable Git ownership check