@@ -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
104128When using a password, a temporary key is generated using [ ssh-keygen] ( https://linux.die.net/man/1/ssh-copy-id )
105129and 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 ) .
106130The 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
126154This 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
130158Variables in this file are exported before running stack deploy.
131159If 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
147175See 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
151185When the default ` always ` is used, this argument is omitted.
152186
153187See 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
157191Set 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
161195See 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
165199To run [ docker login] ( https://docs.docker.com/reference/cli/docker/login/ ) on another registry.
166200
167201Example: ` 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
171209Required to run [ docker login] ( https://docs.docker.com/reference/cli/docker/login/ ) before stack deploy.
172210
0 commit comments