You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy a **compose** stack instead of _swarm_. Set to `true` to enable.
127
129
128
130
Default: `false`
129
131
130
-
### env_json <CB /> {#env_json}
132
+
### env_data <CB /> {#env_data}
131
133
132
134
Optional environment variables used when creating the stack.
133
-
File should be in dotenv format and JSON should be an object. Example: {"KEY": "Value"}
134
135
135
-
This can be used with [env_file](#env_file). Values in [env_file](#env_file) take precedence over these values.
136
+
These can be provided in JSON or YAML format and can be used with [env_file](#env_file).
137
+
Values in [env_file](#env_file) take precedence over these values.
136
138
137
-
::: details View JSON Input Examples
139
+
::: details View JSON/YAML Input Examples
138
140
139
141
These examples are identical, just different ways of passing the input.
140
142
141
143
::: code-group
142
144
145
+
```yaml [YAML]
146
+
- uses: cssnr/portainer-stack-deploy-action@v1
147
+
with:
148
+
env_data: |
149
+
KEY: Value
150
+
KEY_2: Value 2
151
+
```
152
+
143
153
```yaml [Multi-Line JSON]
144
154
- uses: cssnr/portainer-stack-deploy-action@v1
145
155
with:
146
-
env_json: |
156
+
env_data: |
147
157
{
148
158
"KEY": "Value",
149
159
"KEY_2": "Value 2"
@@ -153,7 +163,7 @@ These examples are identical, just different ways of passing the input.
153
163
```yaml [Single Line JSON]
154
164
- uses: cssnr/portainer-stack-deploy-action@v1
155
165
with:
156
-
env_json: '{"KEY": "Value", "KEY_2": "Value 2"}'
166
+
env_data: '{"KEY": "Value", "KEY_2": "Value 2"}'
157
167
```
158
168
159
169
Note: Additional [inputs](../docs/inputs.md) are excluded for brevity.
@@ -162,16 +172,16 @@ Note: Additional [inputs](../docs/inputs.md) are excluded for brevity.
162
172
163
173
::: warning
164
174
Inputs are NOT secure unless using secrets or secure output (masked).
165
-
Using `env_json` on a public repository will otherwise expose this data in the actions' logs.
166
-
For an example of an action that produces secure out for use with `env_json` see the [hashicorp/vault-action example](../guides/examples.md#multi-step).
175
+
Using `env_data` on a public repository will otherwise expose this data in the actions' logs.
176
+
For an example of an action that produces secure out for use with `env_data` see the [hashicorp/vault-action example](../guides/examples.md#multi-step).
167
177
To securely pass unmasked values, use the [env_file](#env_file) option.
168
178
:::
169
179
170
180
### env_file <CB /> {#env_file}
171
181
172
182
Environment File in [dotenv](https://www.npmjs.com/package/dotenv) format, parsed using [dotenv](https://www.npmjs.com/package/dotenv).
173
183
174
-
This can be used with [env_json](#env_json). Values in this file take precedence over [env_json](#env_json).
184
+
This can be used with [env_data](#env_data). Values in this file take precedence over [env_data](#env_data).
175
185
176
186
::: details View Environment File Input Example
177
187
@@ -194,9 +204,9 @@ Note: Additional [inputs](../docs/inputs.md) are excluded for brevity.
194
204
### merge_env <CB /> {#merge_env}
195
205
196
206
Set this to `true` to merge the current environment variables from the existing stack
197
-
with any newly provided variables in the [env_json](#env_json) or [env_file](#env_file) inputs.
207
+
with any newly provided variables in the [env_data](#env_data) or [env_file](#env_file) inputs.
198
208
199
-
When not providing the [env_json](#env_json) or [env_file](#env_file) inputs the
209
+
When not providing the [env_data](#env_data) or [env_file](#env_file) inputs the
200
210
current environment variables from the existing stack are always used.
201
211
202
212
When deploying a new stack, there are no current environment variables to merge, and this has no effect.
@@ -215,41 +225,55 @@ Password for private repository authentication when [type](#type) is set to `rep
215
225
216
226
This is **NOT** your Portainer password, see [token](#token) for Portainer authentication.
Copy file name to clipboardExpand all lines: docs/guides/get-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,8 @@ You only need to set the [name](../docs/inputs.md#name), [url](../docs/inputs.md
44
44
The compose [file](../docs/inputs.md#file) path is relative to your working directory.
45
45
If you check out your repository to the root and your compose file is in the `app` directory, set [file](../docs/inputs.md#file) to: `app/docker-compose.yaml`
46
46
47
-
You can provide environment variables from either a file or JSON.
48
-
If providing secrets via [env_json](../docs/inputs.md#env_json) they should come from secure input (masked).
47
+
You can provide environment variables from either a file or JSON/YAML.
48
+
If providing secrets via [env_data](../docs/inputs.md#env_data) they should come from secure input (masked).
0 commit comments