Skip to content

Commit

Permalink
change to use sshpass environment variable
Browse files Browse the repository at this point in the history
i suspect the pipe is the issue
  • Loading branch information
456dev committed Mar 17, 2023
1 parent 23d480d commit 72215d3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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>&-

0 comments on commit 72215d3

Please sign in to comment.