@@ -112,7 +112,7 @@ jobs:
112
112
exit 1
113
113
fi
114
114
115
- if [[ $(jq -r .format_version "${{ steps.apply.outputs.json_plan_path }}") != "0.2 " ]]; then
115
+ if [[ $(jq -r .format_version "${{ steps.apply.outputs.json_plan_path }}") != "1.0 " ]]; then
116
116
echo "::error:: json_plan_path not set correctly"
117
117
exit 1
118
118
fi
@@ -164,46 +164,46 @@ jobs:
164
164
165
165
- name : Apply
166
166
uses : ./terraform-apply
167
- id : output
167
+ id : first-apply
168
168
with :
169
169
path : tests/apply/changes
170
170
171
171
- name : Verify outputs
172
172
run : |
173
- if [[ "${{ steps.output .outputs.output_string }}" != "the_string" ]]; then
173
+ if [[ "${{ steps.first-apply .outputs.output_string }}" != "the_string" ]]; then
174
174
echo "::error:: output s not set correctly"
175
175
exit 1
176
176
fi
177
177
178
- if [[ $(jq -r .output_changes.output_string.actions[0] "${{ steps.output .outputs.json_plan_path }}") != "create" ]]; then
178
+ if [[ $(jq -r .output_changes.output_string.actions[0] "${{ steps.first-apply .outputs.json_plan_path }}") != "create" ]]; then
179
179
echo "::error:: json_plan_path not set correctly"
180
180
exit 1
181
181
fi
182
182
183
- if ! grep -q "Terraform will perform the following actions" '${{ steps.output .outputs.text_plan_path }}'; then
183
+ if ! grep -q "Terraform will perform the following actions" '${{ steps.first-apply .outputs.text_plan_path }}'; then
184
184
echo "::error:: text_plan_path not set correctly"
185
185
exit 1
186
186
fi
187
187
188
188
- name : Apply
189
189
uses : ./terraform-apply
190
- id : output
190
+ id : second-apply
191
191
with :
192
192
path : tests/apply/changes
193
193
194
194
- name : Verify outputs
195
195
run : |
196
- if [[ "${{ steps.output .outputs.output_string }}" != "the_string" ]]; then
196
+ if [[ "${{ steps.second-apply .outputs.output_string }}" != "the_string" ]]; then
197
197
echo "::error:: output s not set correctly"
198
198
exit 1
199
199
fi
200
200
201
- if [[ $(jq -r .format_version "${{ steps.output .outputs.json_plan_path }}") != "0.2 " ]]; then
201
+ if [[ $(jq -r .format_version "${{ steps.second-apply .outputs.json_plan_path }}") != "1.0 " ]]; then
202
202
echo "::error:: json_plan_path not set correctly"
203
203
exit 1
204
204
fi
205
205
206
- if ! grep -q "No changes" '${{ steps.output .outputs.text_plan_path }}'; then
206
+ if ! grep -q "No changes" '${{ steps.second-apply .outputs.text_plan_path }}'; then
207
207
echo "::error:: text_plan_path not set correctly"
208
208
exit 1
209
209
fi
@@ -511,7 +511,8 @@ jobs:
511
511
exit 1
512
512
fi
513
513
514
- if [[ $(jq -r .format_version "${{ steps.output.outputs.json_plan_path }}") != "0.2" ]]; then
514
+ cat "${{ steps.output.outputs.json_plan_path }}"
515
+ if [[ $(jq -r .format_version "${{ steps.output.outputs.json_plan_path }}") != "0.1" ]]; then
515
516
echo "::error:: json_plan_path not set correctly"
516
517
exit 1
517
518
fi
@@ -544,7 +545,7 @@ jobs:
544
545
exit 1
545
546
fi
546
547
547
- if [[ $(jq -r .format_version "${{ steps.apply.outputs.json_plan_path }}") != "0.2 " ]]; then
548
+ if [[ $(jq -r .format_version "${{ steps.apply.outputs.json_plan_path }}") != "1.0 " ]]; then
548
549
echo "::error:: json_plan_path not set correctly"
549
550
exit 1
550
551
fi
0 commit comments