File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,35 @@ jobs:
517517 PASS='3HUS$?8kLu)}'
518518 printf "PASS=${PASS}" >> $GITHUB_ENV
519519
520- - name : Show Environment Variables
520+ - name : create new ssh server
521521 run : |
522- echo $PASS
522+ docker run -d \
523+ --name=openssh-server \
524+ --hostname=openssh-server \
525+ -p 2222:2222 \
526+ -e SUDO_ACCESS=false \
527+ -e PASSWORD_ACCESS=true \
528+ -e USER_PASSWORD=${{ env.PASS }} \
529+ -e USER_NAME=linuxserver.io \
530+ --restart unless-stopped \
531+ lscr.io/linuxserver/openssh-server:latest
532+ docker exec openssh-server sh -c "hostname -i" > ip.txt
533+ echo "REMOTE_HOST<<EOF" >> $GITHUB_ENV
534+ cat ip.txt >> $GITHUB_ENV
535+ echo "EOF" >> $GITHUB_ENV
536+ echo "======= container ip address ========="
537+ cat ip.txt
538+ echo "======================================"
539+ sleep 2
540+
541+ - name : ssh by username and password
542+ uses : ./
543+ with :
544+ host : ${{ env.REMOTE_HOST }}
545+ username : linuxserver.io
546+ password : ${{ env.PASS }}
547+ port : 2222
548+ script : |
549+ #!/usr/bin/env bash
550+ set -e
551+ whoami
You can’t perform that action at this time.
0 commit comments