Compare commits

..

6 Commits

Author SHA1 Message Date
Jesse
0ca34f1409
Merge 151aa23409 into e13c387332 2024-12-03 15:50:09 +00:00
Jesse
151aa23409
Merge pull request #4 from GammaGames/test
test bool
2024-12-03 08:50:05 -07:00
GammaGames
05bfd68c72 test bool 2024-12-03 08:46:43 -07:00
Jesse
5429cd9d13
Merge branch 'master' into master 2024-12-03 08:42:04 -07:00
GammaGames
6339d4b013 fix upxstream conflicts 2024-12-03 08:41:12 -07:00
Bo-Yi Wu
e13c387332
ci(action): display an environment variable with special characters (#351)
- Add a new job `testing07` with steps to set environment variables and create an SSH server container
- Set a special character password in environment variables
- Run a Docker container for an OpenSSH server and capture its IP address
- Add steps to SSH into the server using username and password authentication

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-12-02 23:19:33 +08:00

View File

@ -505,6 +505,51 @@ jobs:
script: | script: |
whoami whoami
testing07:
name: some special character
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set Environment Variables
run: |
PASS='3HUS$?8kLu)}'
printf "PASS=${PASS}" >> $GITHUB_ENV
- name: create new ssh server
run: |
docker run -d \
--name=openssh-server \
--hostname=openssh-server \
-p 2222:2222 \
-e SUDO_ACCESS=false \
-e PASSWORD_ACCESS=true \
-e USER_PASSWORD='${{ env.PASS }}' \
-e USER_NAME=linuxserver.io \
--restart unless-stopped \
lscr.io/linuxserver/openssh-server:latest
docker exec openssh-server sh -c "hostname -i" > ip.txt
echo "REMOTE_HOST<<EOF" >> $GITHUB_ENV
cat ip.txt >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "======= container ip address ========="
cat ip.txt
echo "======================================"
sleep 2
- name: ssh by username and password
uses: ./
with:
host: ${{ env.REMOTE_HOST }}
username: linuxserver.io
password: ${{ env.PASS }}
port: 2222
script: |
#!/usr/bin/env bash
set -e
whoami
testing-capturing-output: testing-capturing-output:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -540,7 +585,7 @@ jobs:
username: linuxserver.io username: linuxserver.io
password: password password: password
port: 2222 port: 2222
capture_stdout: 'true' capture_stdout: true
script: | script: |
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e