Skip to content

Commit 5dfae8c

Browse files
authored
Merge pull request #16 from sourcetoad/docs-update
docs: rewrite docs to table based
2 parents daf9e21 + d293504 commit 5dfae8c

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,26 @@ Setup an SSH socket with a private key.
33

44
## Usage
55
### Inputs
6-
#### `host`
7-
**Required** Remote hostname
86

9-
#### `port`
10-
**Optional** SSH port
7+
Following inputs can be used as `step.with` keys
118

12-
This is only necessary if the SSH server does not listen on port 22. It is used to retrieve the host key so it can be trusted for host key verification.
9+
| Name | Required | Type | Description |
10+
|------------------|----------|---------|------------------------------------|
11+
| `host` | Yes | String | Remote hostname. |
12+
| `port` | No | Number | SSH Port (default: `22`). |
13+
| `socket-path` | Yes | String | Path at which to create socket. |
14+
| `key` | Yes | String | base64 private key |
1315

14-
#### `socket-path`
15-
**Required** Path at which to create socket.
16-
17-
#### `key`
18-
**Required** SSH private key as base64
19-
20-
Base64 encode your key:
16+
You may encode your private key in base64 via:
2117

2218
openssl base64 -in {PRIVATE_KEY_FILE} -out {OUTPUT_PRIVATE_KEY_FILE}
2319

24-
You can store this in your GitHub Secrets to be referenced in your workflow when using this action.
25-
20+
Store that in GitHub Secrets to securely pass to the action.
2621

2722
### Outputs
28-
#### `socket-path`
29-
Path at which socket was created.
23+
| Name | Description |
24+
|------------------|------------------------------|
25+
| `socket-path` | Path at which socket was created |
3026

3127
### Example usage
3228
- name: SSH Socket Setup
@@ -36,11 +32,11 @@ Path at which socket was created.
3632
host: github.com
3733
port: 22 # optional
3834
socket-path: /tmp/ssh_agent.sock
39-
key: {BASE64_SECRET_KEY}
35+
key: ${{ secrets.BASE64_SECRET_KEY }}
4036

4137
- name: Use SSH socket
4238
run: ls -l "${{ steps.ssh-socket-action.outputs.socket-path }}"
43-
39+
4440
## Development
4541
Make `ncc` available in your build environment:
4642

@@ -54,6 +50,8 @@ Build `dist/index.js`:
5450

5551
ncc build index.js
5652

53+
---
54+
5755
### Install as Local Action
5856
For quicker troubleshooting cycles, the action can be copied directly into another project. This way, changes to the action and it's usage can happen simultaneously, in one commit.
5957

0 commit comments

Comments
 (0)