mirror of
https://github.com/appleboy/ssh-action.git
synced 2025-06-20 16:42:10 +10:00
fix(sudo): support request_pty to execute sudo command (#288)
- Add a new job called `testing05` to the CI workflow - Update the base image in the Dockerfile from `1.7.2` to `1.7.3` - Update the action name, description, and author in the action.yml file - Update the descriptions for various inputs in the action.yml file - Add a new input `request_pty` with a description in the action.yml file - Update the `using` and `image` fields in the action.yml file - Update the `using` and `image` fields in the runs section of the action.yml file - Update the `icon` and `color` fields in the branding section of the action.yml file Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
2451745138
commit
d134a26a1f
3 changed files with 61 additions and 38 deletions
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
|
@ -261,3 +261,24 @@ jobs:
|
|||
script_stop: true
|
||||
script: |
|
||||
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||
|
||||
testing05:
|
||||
name: switch user
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: switch to root user
|
||||
uses: ./
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
port: ${{ secrets.PORT }}
|
||||
script_stop: true
|
||||
request_pty: true
|
||||
command_timeout: 30s
|
||||
script: |
|
||||
whoami && echo 'hello world' && touch todo.txt
|
||||
sudo whoami
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue