-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
44 lines (41 loc) · 1.27 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: SSH Remote Command Action
description: Executes a provided command on a remote SSH server using a private key or password.
author: favware
branding:
icon: terminal
color: gray-dark
inputs:
host:
description: SSH host address (i.e. the IP address of the server)
port:
description: SSH port number
default: '22'
key:
description: Content of the SSH private key. For example, the raw content of ~/.ssh/id_rsa.
passphrase:
description: Passphrase for the SSH key (only used if "key" is provided)
username:
description: SSH username
password:
description: SSH password (ignored if "key" is provided)
command:
description: Commands to be executed.
silent:
description: Whether to hide the output of the command.
default: 'false'
runs:
using: composite
steps:
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- run: ssh-remote-action.sh
shell: bash
env:
SSH_HOST: ${{ inputs.host }}
SSH_PORT: ${{ inputs.port }}
SSH_KEY: ${{ inputs.key }}
SSH_KEY_PASSPHRASE: ${{ inputs.passphrase }}
SSH_USERNAME: ${{ inputs.username }}
SSH_PASSWORD: ${{ inputs.password }}
SSH_COMMAND: ${{ inputs.command }}
SILENT: ${{ inputs.silent }}