Skip to content

Commit 9436fcc

Browse files
authored
docs: cleanup readme for easier formatting (#28)
1 parent 66e3afb commit 9436fcc

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

README.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,56 @@ Setup an SSH socket with a private key.
66

77
Following inputs can be used as `step.with` keys
88

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 |
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 |
1515

1616
You may encode your private key in base64 via:
1717

18-
openssl base64 -in {PRIVATE_KEY_FILE} -out {OUTPUT_PRIVATE_KEY_FILE}
18+
```shell
19+
openssl base64 -in {PRIVATE_KEY_FILE} -out {OUTPUT_PRIVATE_KEY_FILE}
20+
```
1921

2022
Store that in GitHub Secrets to securely pass to the action.
2123

2224
### Outputs
23-
| Name | Description |
24-
|------------------|------------------------------|
25+
| Name | Description |
26+
|---------------|----------------------------------|
2527
| `socket-path` | Path at which socket was created |
2628

2729
### Example usage
28-
- name: SSH Socket Setup
29-
id: ssh-socket-action
30-
uses: sourcetoad/ssh-socket-action@v1.0.0
31-
with:
32-
host: github.com
33-
port: 22 # optional
34-
socket-path: /tmp/ssh_agent.sock
35-
key: ${{ secrets.BASE64_SECRET_KEY }}
36-
37-
- name: Use SSH socket
38-
run: ls -l "${{ steps.ssh-socket-action.outputs.socket-path }}"
30+
```yaml
31+
- name: SSH Socket Setup
32+
id: ssh-socket-action
33+
uses: sourcetoad/ssh-socket-action@v1.0.0
34+
with:
35+
host: github.com
36+
port: 22 # optional
37+
socket-path: /tmp/ssh_agent.sock
38+
key: ${{ secrets.BASE64_SECRET_KEY }}
39+
40+
- name: Use SSH socket
41+
run: ls -l "${{ steps.ssh-socket-action.outputs.socket-path }}"
42+
```
3943
4044
## Development
4145
Make `ncc` available in your build environment:
42-
43-
npm i -g @zeit/ncc
46+
```shell
47+
npm i -g @zeit/ncc
48+
```
4449

4550
Install package dependencies:
46-
47-
yarn install
51+
```shell
52+
yarn install
53+
```
4854

4955
Build `dist/index.js`:
50-
51-
ncc build index.js
52-
56+
```shell
57+
ncc build index.js
58+
```
5359
---
5460

5561
### Install as Local Action

0 commit comments

Comments
 (0)