GHA reliability: retry FTP upload #3011

trying SFTP
This commit is contained in:
rusefillc 2021-10-18 21:06:25 -04:00
parent 8bd3b79b89
commit 471a2ef915
1 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,12 @@
# todo: rename this script since it's a universal one?
#
# user=$1
# pass=$2
# host=$3
# destination_folder=$4
# file_to_upload=$5
if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then
echo "No Secrets"
exit 0
@ -13,4 +19,7 @@ fi
echo -e "\nUploading file: $5"
ncftpput -r 999 -m -R -v -u "$1" -p "$2" "$3" $4 $5
# ncftpput -r 999 -m -R -v -u "$1" -p "$2" "$3" $4 $5
echo put $5 $4 > cmd
sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3 <<< `cat cmd`