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
|
@ -28,9 +28,9 @@ jobs:
|
||||||
echo "======= container ip address ========="
|
echo "======= container ip address ========="
|
||||||
cat ip.txt
|
cat ip.txt
|
||||||
echo "======================================"
|
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
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
with:
|
with:
|
||||||
host: ${{ env.REMOTE_HOST }}
|
host: ${{ env.REMOTE_HOST }}
|
||||||
|
@ -65,7 +65,7 @@ jobs:
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name=openssh-server \
|
--name=openssh-server \
|
||||||
--hostname=openssh-server \
|
--hostname=openssh-server \
|
||||||
-p 2223:2222 \
|
-p 2222:2222 \
|
||||||
-e PUBLIC_KEY="${{ env.PUBLIC_KEY }}" \
|
-e PUBLIC_KEY="${{ env.PUBLIC_KEY }}" \
|
||||||
-e SUDO_ACCESS=false \
|
-e SUDO_ACCESS=false \
|
||||||
-e PASSWORD_ACCESS=true \
|
-e PASSWORD_ACCESS=true \
|
||||||
|
@ -80,13 +80,13 @@ jobs:
|
||||||
echo "======= container ip address ========="
|
echo "======= container ip address ========="
|
||||||
cat ip.txt
|
cat ip.txt
|
||||||
echo "======================================"
|
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
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
with:
|
with:
|
||||||
host: ${{ env.REMOTE_HOST }}
|
host: ${{ env.REMOTE_HOST }}
|
||||||
username: linuxserver.io
|
username: linuxserver.io
|
||||||
key: ${{ env.PRIVATE_KEY }}
|
key: ${{ env.PRIVATE_KEY }}
|
||||||
port: 2223
|
port: 2222
|
||||||
script: whoami
|
script: whoami
|
||||||
|
|
Loading…
Reference in New Issue