File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,33 @@ This action is great for executing migrations or other pre/post deployment steps
56
56
security-group-ids : sg-123456789101112
57
57
` ` `
58
58
59
+ #### Appending multiple lines into a single command
60
+
61
+ You can use the backslash character ` \` to append multiple lines into a single line. This is useful if you have many
62
+ commands to execute and want to keep the YAML file readable. Otherwise, each line will be passed to the AWS ECS Fargate
63
+ task as a separate argument.
64
+
65
+ > **Note:** Make sure to use the `|` character to make sure the YAML parser interprets the value as a multiline string.
66
+ > You can read more about this in the [YAML documentation](https://yaml.org/spec/1.2/spec.html#id2794534).
67
+
68
+ For example :
69
+
70
+ ` ` ` yaml
71
+ ...
72
+ override-container-command: |
73
+ /bin/sh
74
+ -c
75
+ php artisan down && \
76
+ php artisan migrate --force --ansi && \
77
+ php artisan db:seed --force --ansi && \
78
+ php artisan cache:clear --ansi
79
+ ` ` `
80
+
81
+ Will pass the following command to the container on the AWS ECS Fargate task :
82
+ ` ` `
83
+ ["sh", "-c", "php artisan down && php artisan migrate --force --ansi && php artisan db:seed --force --ansi && php artisan cache:clear --ansi"]
84
+ ` ` `
85
+
59
86
<!-- action-docs-inputs -->
60
87
# # Inputs
61
88
You can’t perform that action at this time.
0 commit comments