Skip to content

Commit c4b38e5

Browse files
committed
workflows: use sshpass
1 parent a52d6fa commit c4b38e5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

.github/workflows/gogo-betting-onpre-stage-cd.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,9 @@ jobs:
4141
run: |
4242
sudo apt-get update && sudo apt-get install -y sshpass openssh-client
4343
44-
- name: Create SSH key for Bastion and Target
45-
run: |
46-
echo "${{ secrets.STAGE_BASTION_SSH_KEY }}" > $HOME/bastion_key.pem
47-
chmod 600 $HOME/bastion_key.pem
48-
4944
- name: SSH Command to Deploy using Bastion and Target Instance
5045
run: |
51-
ssh -i "$HOME/bastion_key.pem" -o StrictHostKeyChecking=no ubuntu@${{ secrets.STAGE_ON_PREMISE_HOST }} << 'EOF'
46+
sshpass -p "${{ secrets.STAGE_ON_PREMISE_PASSWORD }}" ssh -o StrictHostKeyChecking=no ubuntu@${{ secrets.STAGE_ON_PREMISE_HOST }} << 'EOF'
5247
mkdir -p /home/ubuntu/gogo-betting
5348
cd /home/ubuntu/gogo-betting
5449

0 commit comments

Comments
 (0)