You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(release): add promote_sha input for recovery promotion
Allows manually promoting a specific already-published SHA to stable
when testing has advanced past it due to workflow-only commits.
The SHA mismatch guard is bypassed when promote_sha is specified,
since the caller is explicitly asserting which image to promote.
Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
BUILD_SHA=$(gh api "repos/${{ github.repository }}/git/ref/heads/testing" --jq '.object.sha')
@@ -77,7 +87,8 @@ jobs:
77
87
78
88
# Guard: if testing advanced since the build, the reusable fast-forward would
79
89
# point main to a newer commit than the image we're promoting. Skip promotion.
80
-
if [ "${{ github.event_name }}" = "workflow_run" ]; then
90
+
# Bypassed when promote_sha is specified (recovery: explicit SHA override).
91
+
if [ "${{ github.event_name }}" = "workflow_run" ] && [[ -z "${{ inputs.promote_sha }}" ]]; then
81
92
CURRENT_SHA=$(gh api "repos/${{ github.repository }}/git/ref/heads/testing" --jq '.object.sha')
82
93
if [ "$CURRENT_SHA" != "$BUILD_SHA" ]; then
83
94
echo "::warning::testing has advanced (build: ${BUILD_SHA}, current: ${CURRENT_SHA}). Skipping promotion to avoid SHA mismatch on main fast-forward. Will promote next build."
0 commit comments