mirror of
https://github.com/appleboy/ssh-action.git
synced 2024-11-23 06:16:10 +08:00
refactor: optimize CI pipeline for faster execution
- Reduce sleep duration from 3 seconds to 2 seconds - Rename SSH job steps for clarity - Change port mapping from 2223 to 2222 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
2eeab5bdba
commit
da612c8015
12
.github/workflows/ssh-server.yml
vendored
12
.github/workflows/ssh-server.yml
vendored
@ -28,9 +28,9 @@ jobs:
|
||||
echo "======= container ip address ========="
|
||||
cat ip.txt
|
||||
echo "======================================"
|
||||
sleep 3
|
||||
sleep 2
|
||||
|
||||
- name: executing remote ssh commands using password (1.0.3)
|
||||
- name: ssh by username and password
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ env.REMOTE_HOST }}
|
||||
@ -65,7 +65,7 @@ jobs:
|
||||
docker run -d \
|
||||
--name=openssh-server \
|
||||
--hostname=openssh-server \
|
||||
-p 2223:2222 \
|
||||
-p 2222:2222 \
|
||||
-e PUBLIC_KEY="${{ env.PUBLIC_KEY }}" \
|
||||
-e SUDO_ACCESS=false \
|
||||
-e PASSWORD_ACCESS=true \
|
||||
@ -80,13 +80,13 @@ jobs:
|
||||
echo "======= container ip address ========="
|
||||
cat ip.txt
|
||||
echo "======================================"
|
||||
sleep 3
|
||||
sleep 2
|
||||
|
||||
- name: executing remote ssh commands using password (1.0.3)
|
||||
- name: ssh by private
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ env.REMOTE_HOST }}
|
||||
username: linuxserver.io
|
||||
key: ${{ env.PRIVATE_KEY }}
|
||||
port: 2223
|
||||
port: 2222
|
||||
script: whoami
|
||||
|
Loading…
Reference in New Issue
Block a user