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
Environment variables can be used in `deploy.yml`. The syntax is `$FOO` or `${FOO}` and supports
95
-
substring extraction, i.e. `${GITHUB_SHA:0:7}`:
92
+
Environment variables can be used in `deploy.yml`, `startup_script`, `shutdown_script` and `cloud_init` files.
93
+
The syntax is `${{FOO}}` and supports substring extraction, i.e. `${{GITHUB_SHA:0:7}}`:
96
94
97
95
```
98
-
${VAR:position} - Extracts substring from $VAR at "position"
99
-
${VAR:position:length} - Extracts "length" characters of substring from $VAR at "position"
96
+
${{VAR:position}} - Extracts substring from $VAR at "position"
97
+
${{VAR:position:length}} - Extracts "length" characters of substring from $VAR at "position"
100
98
```
101
99
102
-
#### Variables in `startup_script`, `shutdown_script` or `cloud_init`
103
-
104
-
Environment variables or `deploys.*.vars` can be used in the `startup_script`, `shutdown_script` or `cloud_init`, see [example](example/cloud-init.yml).
105
-
The syntax is `${{FOO}}`.
106
-
107
-
#### Github ENV variables
108
-
109
100
Github sets a bunch of [default environment variables](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables#default-environment-variables).
assert.Equal(t, `bar bar bar abarb \$foo \${foo} a\${foo}b bar-bar bar-bar ba b`, out)
217
+
out:=expandVars(in, vars)
218
+
assert.Equal(t, `f fo foo $f $fo $foo ${f} ${fo} ${foo} \${{f}} \${{fo}} \${{foo}} b ba bar b ba bar abb abab abarb a\${{f}}b a\${{fo}}b a\${{foo}}b`, out)
0 commit comments