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
Copy file name to clipboardExpand all lines: README.md
+30-20Lines changed: 30 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,29 @@ or use a tool like [Terraform](https://www.terraform.io).
17
17
* Create a managed [instance group](https://cloud.google.com/compute/docs/instance-groups/). Please note that currently **only regional instance groups** are supported.
18
18
* Create Service Account with Roles `Compute Admin` and `Service Account User` and export a new JSON key.
19
19
20
-
## Config
20
+
21
+
## deploy.yml
21
22
22
23
By default this action expects a `deploy.yml` in the root directory of the repository.
23
-
Environment variables (syntax `$FOO` or `${FOO}`) used in this file are replaced automatically.
24
-
[List of default variables.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables#default-environment-variables)
@@ -35,29 +53,21 @@ Environment variables (syntax `$FOO` or `${FOO}`) used in this file are replaced
35
53
| `deploys.*.startup_script` | Path to script to run when VM boots. [Read more](https://cloud.google.com/compute/docs/startupscript) |
36
54
| `deploys.*.shutdown_script` | Path to script to run when VM shuts down. [Read more](https://cloud.google.com/compute/docs/shutdownscript) |
37
55
| `deploys.*.cloud_init` | Path to cloud-init file. [Read more](https://cloud.google.com/container-optimized-os/docs/how-to/create-configure-instance#using_cloud-init) |
38
-
|`deploys.*.vars`| A set of additional key/value variables which will be available as variables (syntax `$(FOO)`) in either startup_script, shutdown_script or cloud_init. Vars take precedence over ENV vars. |
39
56
| `deploys.*.labels` | A set of key/value label pairs to assign to instances. |
40
57
| `deploys.*.metadata` | A set of key/value metadata pairs to make available from within instances. |
41
58
| `deploys.*.tags` | A list of tags to assign to instances. |
59
+
| `deploys.*.vars` | A set of additional key/value variables which will be available in either startup_script, shutdown_script or cloud_init. They take precedence over ENV vars. |
42
60
| `delete_instance_templates_after` | Delete old instance templates after duration, default '336h' (14 days). Set to 'false' to disable. |
43
61
44
62
45
-
### Example deploy.yml
63
+
### Variables
46
64
47
-
```yaml
65
+
Environment variables can be used in `deploy.yml`, see example above. The syntax is `$FOO` or `${FOO}`.
Environment variables or `deploys.*.vars` can be used in the `startup_script`, `shutdown_script` or `cloud_init`, see [example](example/cloud-init.yml).
68
+
The syntax is `$(FOO)` to not replace actual ENV vars.
69
+
70
+
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).
61
71
62
72
63
73
## Github Action Inputs
@@ -68,10 +78,10 @@ deploys:
68
78
| `config` | Path to config file. Default `deploy.yml` or `deploy.yaml`. |
0 commit comments