Skip to content

Commit cb32270

Browse files
committed
Update Anchor Links to Match Inputs
1 parent 8ad0a7e commit cb32270

File tree

3 files changed

+76
-38
lines changed

3 files changed

+76
-38
lines changed

docs/docs/inputs.md

Lines changed: 71 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@ The inputs are organized in a table for quick [reference](#reference) with addit
66

77
💡 You can click on an input for more [Details](#details).
88

9-
| Input Name | Default Value | Short Description of the Input Value |
10-
| :-------------------------------------------- | :---------------------------------- | :------------------------------------------------------------ |
11-
| [name](#name) **\*** | - | Docker Stack/Project Name |
12-
| [file](#file) | `docker-compose.yaml` | Docker Stack/Compose File(s) |
13-
| [mode](#mode) **¹** | `swarm` | Deploy Mode [`swarm`, `compose`] |
14-
| [args](#args) **¹** | `--remove-orphans --force-recreate` | Additional **Compose** Arguments |
15-
| [host](#host) **\*** | - | Remote Docker Hostname or IP |
16-
| port | `22` | Remote Docker Port |
17-
| user **\*** | - | Remote Docker Username |
18-
| [pass](#pass-ssh-key) **\*** | - | Remote Docker Password |
19-
| [ssh_key](#pass-ssh-key) **\*** | - | Remote SSH Key File |
20-
| [disable_keyscan](#disable-keyscan) | `false` | Disable SSH Keyscan `ssh-keyscan` |
21-
| [env_file](#env-file) | - | Exported Environment File |
22-
| [detach](#detach) **²** | `true` | Detach Flag, `false`, to disable |
23-
| prune **²** | `false` | Prune Flag, `true`, to enable |
24-
| [resolve_image](#resolve-image) **²** | `always` | Resolve [`always`, `changed`, `never`] |
25-
| [registry_auth](#registry-auth) **²** | - | Enable Registry Authentication |
26-
| [registry_host](#registry-host) | - | Registry Authentication Host |
27-
| [registry_user](#registry-user-registry-pass) | - | Registry Authentication Username |
28-
| [registry_pass](#registry-user-registry-pass) | - | Registry Authentication Password |
29-
| [summary](#summary) | `true` | Add Job Summary |
30-
31-
> **\* Required**, note [pass/ssh_key](#pass-ssh-key) are mutually exclusive.
9+
| Input Name | Default Value | Short Description of the Input Value |
10+
| :------------------------------------ | :---------------------------------- | :------------------------------------------------------------ |
11+
| [name](#name) **\*** | - | Docker Stack/Project Name |
12+
| [file](#file) | `docker-compose.yaml` | Docker Stack/Compose File(s) |
13+
| [mode](#mode) **¹** | `swarm` | Deploy Mode [`swarm`, `compose`] |
14+
| [args](#args) **¹** | `--remove-orphans --force-recreate` | Additional **Compose** Arguments |
15+
| [host](#host) **\*** | - | Remote Docker Hostname or IP |
16+
| [port](#port) | `22` | Remote Docker Port |
17+
| [user](#user) **\*** | - | Remote Docker Username |
18+
| [pass](#pass) **\*** | - | Remote Docker Password |
19+
| [ssh_key](#ssh_key) **\*** | - | Remote SSH Key File |
20+
| [disable_keyscan](#disable_keyscan) | `false` | Disable SSH Keyscan `ssh-keyscan` |
21+
| [env_file](#env_file) | - | Exported Environment File |
22+
| [detach](#detach) **²** | `true` | Detach Flag, `false`, to disable |
23+
| [prune](#prune) **²** | `false` | Prune Flag, `true`, to enable |
24+
| [resolve_image](#resolve_image) **²** | `always` | Resolve [`always`, `changed`, `never`] |
25+
| [registry_auth](#registry_auth) **²** | - | Enable Registry Authentication |
26+
| [registry_host](#registry_host) | - | Registry Authentication Host |
27+
| [registry_user](#registry_user) | - | Registry Authentication Username |
28+
| [registry_pass](#registry_pass) | - | Registry Authentication Password |
29+
| [summary](#summary) | `true` | Add Job Summary |
30+
31+
> **\* Required**, note [pass](#pass)/[ssh_key](#ssh_key) are mutually exclusive.
3232
> **¹ Compose Only**, view the [Compose Docs](https://docs.docker.com/reference/cli/docker/compose/up/)
3333
> **² Swarm Only**, view the [Swarm Docs](https://docs.docker.com/reference/cli/docker/stack/deploy/)
3434
@@ -97,15 +97,43 @@ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
9797

9898
:::
9999

100-
### pass/ssh_key <Badge type="warning" text="Required" /> {#pass-ssh-key}
100+
### port
101101

102-
You must provide either a `pass` or `ssh_key`, but **not** both.
102+
SSH Port. The default is 22.
103+
104+
Only set this if using a non-standard port.
105+
106+
Example: `2222`
107+
108+
### user <Badge type="warning" text="Required" />
109+
110+
SSH Username. This user **must** have permissions to access docker.
111+
112+
If you use `sudo` or the `root` user to access docker,
113+
it is recommended you grant docker access to another user or service account.
114+
115+
Replace `mynewuser` with your actual username.
116+
117+
```shell [run ~vscode-icons:file-type-shell~]
118+
sudo usermod -aG docker mynewuser
119+
```
120+
121+
After this you should be able to run `docker` commands as `mynewuser` without `sudo`.
122+
Note, you may need to log out and back in for the changes to take effect.
123+
124+
### pass <Badge type="warning" text="Required" />
125+
126+
You must provide either a `pass` or [ssh_key](#ssh_key), but **not** both.
103127

104128
When using a password, a temporary key is generated using [ssh-keygen](https://linux.die.net/man/1/ssh-copy-id)
105129
and copied to the host with [ssh-copy-id](https://linux.die.net/man/1/ssh-copy-id) using [sshpass](https://linux.die.net/man/1/sshpass).
106130
The authorized_keys file entry is [cleaned up](https://github.com/cssnr/stack-deploy-action/blob/master/src/main.sh#L10) after each deploy.
107131

108-
To generate an SSH key, run the following as the `user` you are using:
132+
### ssh_key <Badge type="warning" text="Required" /> {#ssh_key}
133+
134+
You must provide either a `ssh_key` or [pass](#pass), but **not** both.
135+
136+
To generate an SSH key, run the following as the [user](#user) you are using:
109137

110138
::: code-group
111139

@@ -121,11 +149,11 @@ cat ~/.ssh/id_ed25519
121149

122150
:::
123151

124-
### disable_keyscan
152+
### disable_keyscan {#disable_keyscan}
125153

126154
This will disable the [ssh-keyscan](https://linux.die.net/man/1/ssh-keyscan) command. **Advanced usage only.**
127155

128-
### env_file
156+
### env_file {#env_file}
129157

130158
Variables in this file are exported before running stack deploy.
131159
If you need compose file templating this can also be done in a previous step.
@@ -146,27 +174,37 @@ Defaults to `false` in `mode: compose`.
146174

147175
See the [stack deploy Options](https://docs.docker.com/reference/cli/docker/stack/deploy/#options) for more details.
148176

149-
### resolve_image <Badge type="tip" text="Swarm Only" /> {#resolve-image}
177+
### prune
178+
179+
Prune dangling images. Set to `true` to enable.
180+
181+
See the [stack deploy Options](https://docs.docker.com/reference/cli/docker/stack/deploy/#options) for more details.
182+
183+
### resolve_image <Badge type="tip" text="Swarm Only" /> {#resolve_image}
150184

151185
When the default `always` is used, this argument is omitted.
152186

153187
See the [stack deploy Options](https://docs.docker.com/reference/cli/docker/stack/deploy/#options) for more details.
154188

155-
### registry_auth <Badge type="tip" text="Swarm Only" /> {#registry-auth}
189+
### registry_auth <Badge type="tip" text="Swarm Only" /> {#registry_auth}
156190

157191
Set to `true` to deploy with `--with-registry-auth`.
158192

159-
If setting [registry_user](#registry-user-registry-pass)/[registry_pass](#registry-user-registry-pass) this is implied.
193+
If setting [registry_user](#registry_user)/[registry_pass](#registry_pass) this is implied.
160194

161195
See the [stack deploy Options](https://docs.docker.com/reference/cli/docker/stack/deploy/#options) for more details.
162196

163-
### registry_host
197+
### registry_host {#registry_host}
164198

165199
To run [docker login](https://docs.docker.com/reference/cli/docker/login/) on another registry.
166200

167201
Example: `ghcr.io`
168202

169-
### registry_user/registry_pass
203+
### registry_pass {#registry_pass}
204+
205+
Required to run [docker login](https://docs.docker.com/reference/cli/docker/login/) before stack deploy.
206+
207+
### registry_user {#registry_user}
170208

171209
Required to run [docker login](https://docs.docker.com/reference/cli/docker/login/) before stack deploy.
172210

docs/guides/features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Deploy a Docker [stack](https://docs.docker.com/reference/cli/docker/stack/deplo
44
using a [Remote Context](#remote-context). This deploys the stack from the current workspace without copying files.
55

66
- Deploy to Docker Swarm or Compose.
7-
- Deploy over SSH using [keyfile](../docs/inputs.md#pass-ssh-key) or [password](../docs/inputs.md#pass-ssh-key).
7+
- Deploy over SSH using [keyfile](../docs/inputs.md#ssh_key) or [password](../docs/inputs.md#pass).
88
- Deploy from the current working [directory](#remote-context).
9-
- Deploy from a private registry with [credentials](../docs/inputs.md#registry-user-registry-pass).
9+
- Deploy from a private registry with [credentials](../docs/inputs.md#registry_user).
1010
- [Job Summary](#job-summary) with deployment output, including errors.
1111
- Supports multiple compose [files](../docs/inputs.md#file) and stack deployments.
1212
- Allows setting custom [arguments](../docs/inputs.md#args) for the deployment command.

docs/guides/get-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ _If creating a [new workflow](https://docs.github.com/en/actions/concepts/workfl
2525

2626
**Make sure to update the highlighted lines.**
2727

28-
The only 4 required inputs are [name](../docs/inputs.md#name), [host](../docs/inputs.md#host), `user`
29-
and [pass](../docs/inputs.md#pass-ssh-key) or [ssh_key](../docs/inputs.md#pass-ssh-key) _(not both)_.
28+
The only 4 required inputs are [name](../docs/inputs.md#name), [host](../docs/inputs.md#host), [user](../docs/inputs.md#user)
29+
and [pass](../docs/inputs.md#pass) or [ssh_key](../docs/inputs.md#ssh_key) _(not both)_.
3030

3131
> See the [Inputs Documentation](../docs/inputs.md) for more options and **default** values.
3232
@@ -47,7 +47,7 @@ If using the `workflow_dispatch` trigger you can [manually run the job](https://
4747

4848
You should store your credentials in [GitHub Actions Secrets](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets).
4949

50-
The [SSH key](../docs/inputs.md#pass-ssh-key) should be copied and pasted exactly as it appears in the private key file.
50+
The [SSH key](../docs/inputs.md#ssh_key) should be copied and pasted exactly as it appears in the private key file.
5151

5252
You do not need to add all values as a secret. However, be aware that any inputs not added as a secret,
5353
will be visible in the [GitHub Actions Logs](https://docs.github.com/en/actions/how-tos/monitor-workflows/use-workflow-run-logs).

0 commit comments

Comments
 (0)