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

Pick shell #343

Closed roablep closed 2 weeks ago

roablep commented 3 weeks ago

Describe the bug

I would like to be able to specify the shell used to run the scripts. Currently this is not possible and adding shebang at the top doesn't seem to work.

Yaml Config

Please post your Yaml configuration file along with the output results.

          script: |
            #!/bin/bash
            required_containers=("service1" "service2")
          shell: bash

Related environment

Please provide the following information:

Digital Ocean

appleboy commented 2 weeks ago

try

        with:
          host: ${{ env.REMOTE_HOST }}
          username: linuxserver.io
          password: password
          port: 2222
          script: |
            #!/usr/bin/env bash
            set -e
            whoami