mirror of
https://github.com/pressidium/lftp-mirror-action.git
synced 2024-08-31 16:10:06 +00:00
(#2) Introduce the onlyDifferent input
This commit is contained in:
@@ -59,6 +59,7 @@ jobs:
|
|||||||
| `verifyCertificate` | Verify server’s certificate to be signed by a known Certificate Authority | No | `'true'` |
|
| `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 | `''` |
|
| `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'` |
|
| `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 (if necessary) | No | `'true'` |
|
||||||
| `parallel` | Number of parallel transfers | No | `'1'` |
|
| `parallel` | Number of parallel transfers | No | `'1'` |
|
||||||
| `settings` | Any additional lftp settings to configure | No | `''` |
|
| `settings` | Any additional lftp settings to configure | No | `''` |
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ inputs:
|
|||||||
description: 'Only transfer files that are newer than the ones on the remote server'
|
description: 'Only transfer files that are newer than the ones on the remote server'
|
||||||
required: false
|
required: false
|
||||||
default: 'true'
|
default: 'true'
|
||||||
|
onlyDifferent:
|
||||||
|
description: 'Only transfer files that are different than the ones on the remote server'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
parallel:
|
parallel:
|
||||||
description: 'Number of parallel transfers'
|
description: 'Number of parallel transfers'
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
# - `INPUT_VERIFYCERTIFICATE` — Verify server's certificate to be signed by a known Certificate Authority
|
# - `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_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_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_PARALLEL` — Number of parallel transfers
|
# - `INPUT_PARALLEL` — Number of parallel transfers
|
||||||
# - `INPUT_SETTINGS` — Any additional lftp settings to configure
|
# - `INPUT_SETTINGS` — Any additional lftp settings to configure
|
||||||
# - `INPUT_LOCALDIR` — The local directory to copy to (assuming `reverse` is set to `true`)
|
# - `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}"
|
echo "Ignoring invalid value for the 'parallel' input: ${INPUT_PARALLEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restore timestamps if the `--only-newer` flag is set
|
# Restore timestamps if the `onlyNewer` or `onlyDifferent` input flag is set
|
||||||
if is_true "${INPUT_ONLYNEWER}"; then
|
if is_true "${INPUT_ONLYNEWER}" || is_true "${INPUT_ONLYDIFFERENT}"; then
|
||||||
echo "Restoring the original modification time of files based on the date of the most recent commit..."
|
echo "Restoring the original modification time of files based on the date of the most recent commit..."
|
||||||
|
|
||||||
# Disable Git ownership check
|
# Disable Git ownership check
|
||||||
|
|||||||
Reference in New Issue
Block a user