Commit adb854d
committed
Validate and Construct sync Parameters
Why these changes are being introduced:
First, we want to ensure that the only additional parameters supplied
by the caller workflow are `--include` and `--exclude` parameters.
Second, since we pass the parameters via an `env:` block, we have to
be extra careful with double-quotes (which are required by the
`aws s3 sync` command, but typically get stripped when expanded in a
bash script).
How these changes are implemented:
* Add a block to the validation step to throw an error if there is
any other parameter in the SYNC_PARAMS input outside of `--include` and
`--exclude`
* If the SYNC_PARAMS is valid, merge it together with the other stock
`--exclude` parameters and set one string in the GITHUB_ENV with the
full list of inclues and excludes
* Add the `eval` command to properly expand the `aws s3 sync` command
and preserve the double-quotes where they are required
Side effects:
None.1 parent a4e2620 commit adb854d
1 file changed
Lines changed: 26 additions & 11 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
109 | | - | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| |||
151 | 169 | | |
152 | 170 | | |
153 | 171 | | |
154 | | - | |
| 172 | + | |
155 | 173 | | |
156 | | - | |
| 174 | + | |
157 | 175 | | |
158 | 176 | | |
159 | 177 | | |
| |||
182 | 200 | | |
183 | 201 | | |
184 | 202 | | |
185 | | - | |
| 203 | + | |
186 | 204 | | |
187 | 205 | | |
188 | 206 | | |
| |||
191 | 209 | | |
192 | 210 | | |
193 | 211 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
200 | 215 | | |
201 | 216 | | |
202 | 217 | | |
| |||
0 commit comments