@@ -245,6 +245,8 @@ jobs:
245245 selected_version=""
246246 rollback_state='{}'
247247
248+ # Validate all workloads have images, then promote the primary workload's
249+ # image as the canonical image for this GVC.
248250 while IFS= read -r workload_name; do
249251 [[ -n "${workload_name}" ]] || continue
250252
@@ -372,7 +374,7 @@ jobs:
372374 accepted_statuses : ${{ env.HEALTH_CHECK_ACCEPTED_STATUSES }}
373375
374376 - name : Roll back on failure
375- if : failure() && steps.capture-current.outputs.rollback_state != '' && steps.capture-current.outputs.rollback_state ! = '{} '
377+ if : failure() && steps.capture-current.outcome = = 'success '
376378 env :
377379 ROLLBACK_STATE : ${{ steps.capture-current.outputs.rollback_state }}
378380 PRODUCTION_APP_NAME : ${{ vars.PRODUCTION_APP_NAME }}
@@ -439,7 +441,7 @@ jobs:
439441 fi
440442
441443 - name : Wait for rollback readiness
442- if : failure() && steps.capture-current.outputs.rollback_state != '' && steps.capture-current.outputs.rollback_state ! = '{} '
444+ if : failure() && steps.capture-current.outcome = = 'success '
443445 env :
444446 ROLLBACK_STATE : ${{ steps.capture-current.outputs.rollback_state }}
445447 PRODUCTION_APP_NAME : ${{ vars.PRODUCTION_APP_NAME }}
@@ -462,6 +464,7 @@ jobs:
462464 pids=()
463465 for workload_name in "${workloads[@]}"; do
464466 [[ -n "${workload_name}" ]] || continue
467+ status_name="${workload_name//\//_}"
465468
466469 echo "Polling rollback readiness for workload '${workload_name}'..."
467470 (
@@ -480,9 +483,9 @@ jobs:
480483 done
481484
482485 if [[ "${ready}" == "true" ]]; then
483- printf 'ready\n' > "${status_dir}/${workload_name }"
486+ printf 'ready\n' > "${status_dir}/${status_name }"
484487 else
485- printf 'not_ready\n' > "${status_dir}/${workload_name }"
488+ printf 'not_ready\n' > "${status_dir}/${status_name }"
486489 fi
487490 ) &
488491 pids+=("$!")
@@ -498,7 +501,8 @@ jobs:
498501
499502 for workload_name in "${workloads[@]}"; do
500503 [[ -n "${workload_name}" ]] || continue
501- status_file="${status_dir}/${workload_name}"
504+ status_name="${workload_name//\//_}"
505+ status_file="${status_dir}/${status_name}"
502506 if [[ ! -f "${status_file}" ]] || [[ "$(<"${status_file}")" != "ready" ]]; then
503507 echo "::warning::Workload '${workload_name}' did not report ready after rollback."
504508 fi
@@ -510,6 +514,7 @@ jobs:
510514 HEALTHY : ${{ steps.health-check.outputs.healthy }}
511515 PREVIOUS_IMAGE : ${{ steps.capture-current.outputs.current_image }}
512516 PREVIOUS_VERSION : ${{ steps.capture-current.outputs.current_version }}
517+ DEPLOYED_IMAGE : ${{ steps.staging-image.outputs.image }}
513518 shell : bash
514519 run : |
515520 {
@@ -523,6 +528,7 @@ jobs:
523528 echo
524529 echo "Previous image: \`${PREVIOUS_IMAGE}\`"
525530 echo "Previous version: ${PREVIOUS_VERSION}"
531+ echo "Deployed image: \`${DEPLOYED_IMAGE}\`"
526532 } >> "$GITHUB_STEP_SUMMARY"
527533
528534 create-github-release :
0 commit comments