-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change to use sshpass environment variable
i suspect the pipe is the issue
- Loading branch information
Showing
1 changed file
with
2 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,23 +123,11 @@ jobs: | |
packages: "sshpass" | ||
- name: SFTP Deploy | ||
env: | ||
DEPLOY_SSH_PASSWORD: ${{ secrets.DEPLOY_SSH_PASSWORD }} | ||
SSHPASS: ${{ secrets.DEPLOY_SSH_PASSWORD }} | ||
run: | | ||
PIPE=$(mktemp -u) | ||
mkfifo -m 600 $PIPE | ||
# Attach it to file descriptior 3 | ||
exec 3<>$PIPE | ||
# Delete the directory entry | ||
rm $PIPE | ||
# Write your password in the pipe | ||
echo -n $DEPLOY_SSH_PASSWORD >&3 | ||
# Connect with sshpass -d | ||
sshpass -d3 sftp -4 -oStrictHostKeyChecking=false -oBatchMode=no -b - sftp://[email protected]:2225 << ! | ||
sshpass -e sftp -4 -oStrictHostKeyChecking=false -oBatchMode=no -b - sftp://[email protected]:2225 << ! | ||
-rm /plugins/update/HCCore-Shadow-*.jar | ||
put HCCore-Shadow-*.jar /plugins/update/ | ||
bye | ||
! | ||
# Close the pipe when done | ||
exec 3>&- | ||