File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -185,15 +185,25 @@ jobs:
185185 steps :
186186 - name : Final Status Check
187187 run : |
188- pre_merge_pipeline_result="${{ needs.pre-merge-pipeline.result }}"
189- pre_merge_os_profiles_result="${{ needs.pre-merge-os-profiles.result }}"
188+ pre_merge_root_pipeline="${{ needs.pre-merge-root.result }}"
189+ pre_merge_pipeline="${{ needs.pre-merge-pipeline.result }}"
190+ pre_merge_os_profiles="${{ needs.pre-merge-os-profiles.result }}"
191+ pre_merge_os_profiles_2="${{ needs.pre-merge-os-profiles-2.result }}"
190192
191- echo "Pre-merge pipeline result: $pre_merge_pipeline_result"
192- echo "Pre-merge os-profiles result: $pre_merge_os_profiles_result"
193-
194- if [ "$pre_merge_pipeline_result" == "success" ] || [ "$pre_merge_pipeline_result" == "skipped" ] || [ "$pre_merge_os_profiles_result" == "success" ]; then
195- echo "At least one pre-merge check passed successfully."
193+ results=("pre_merge_root_pipeline" "pre_merge_pipeline" "pre_merge_os_profiles" "pre_merge_os_profiles_2")
194+ status="OK"
195+
196+ for result in "${results[@]}"; do
197+ pipeline_result=$(eval echo \$$result)
198+ echo "${result} result: $pipeline_result"
199+ if [[ "$pipeline_result" != "success" && "$pipeline_result" != "skipped" ]]; then
200+ status="KO"
201+ fi
202+ done
203+
204+ if [[ "$status" == "OK" ]]; then
205+ echo "Pre-merge check passed successfully."
196206 else
197- echo "Both pre-merge checks failed or were skipped. PR can't get merged"
207+ echo "All pre-merge checks failed or were skipped. PR can't get merged"
198208 exit 1
199209 fi
You can’t perform that action at this time.
0 commit comments