4 Commits

Author SHA1 Message Date
Konstantinos Pappas 799d35253e Merge pull request #4 from pressidium/restoremtime#2
Introduce `restoreMTime` input
2024-01-19 16:24:20 +02:00
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
over-engineer 6989e9057e (#2) Introduce the onlyDifferent input 2024-01-19 15:22:15 +02:00
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -59,7 +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'` |
| `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 | `'.'` |
+4
View File
@@ -31,6 +31,10 @@ inputs:
description: 'Only transfer files that are newer than the ones on the remote server'
required: false
default: 'true'
restoreMTime:
description: 'Restore the modification time of the files'
required: false
default: 'true'
parallel:
description: 'Number of parallel transfers'
required: false
+3 -2
View File
@@ -19,6 +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_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`)
@@ -283,8 +284,8 @@ else
echo "Ignoring invalid value for the 'parallel' input: ${INPUT_PARALLEL}"
fi
# Restore timestamps if the `--only-newer` flag is set
if is_true "${INPUT_ONLYNEWER}"; 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