appleboy / ssh-action

GitHub Actions for executing remote ssh commands.
https://github.com/marketplace/actions/ssh-remote-commands
MIT License
4.84k stars 576 forks source link

Missed some special character in ENV #346

Open viettl opened 1 week ago

viettl commented 1 week ago

Describe the bug

In the process of retrieving variables from the Github environment, special characters such as $? are missing.

Example Yaml Config

    - name: Set Environment Variables
        run: |

            echo "HOST=${{ secrets.DEV_SERVER }}" >> $GITHUB_ENV
            echo "USER=${{ secrets.DEV_USER }}" >> $GITHUB_ENV
            echo "PASS=${{ secrets.DEV_PASS }}" >> $GITHUB_ENV

      - name: CI Server
        uses: appleboy/ssh-action@master
        with:
          host: ${{ env.HOST }}
          username: ${{ env.USER }}
          password: ${{ env.PASS }}

eg: with DEV_PASS : 3HUS$?8kLu)} will get: 3HUS8kLu)}

and the password is logged as plain text instead of *** in ci log. Thanks for your help.