From 5867e6e11e7a59bc455d548a56a653f241e96075 Mon Sep 17 00:00:00 2001 From: manNomi Date: Thu, 19 Feb 2026 23:13:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20release=20=EC=8A=B9=EA=B2=A9=20force=5Fr?= =?UTF-8?q?edeploy=20=EB=B6=84=EA=B8=B0=EC=97=90=EC=84=9C=20=EB=B8=8C?= =?UTF-8?q?=EB=9E=9C=EC=B9=98=20=EB=B6=84=EA=B8=B0=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bae2d68c..32447364 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ on: - web - admin force_redeploy: - description: "Create empty commit when release branch is already up to date" + description: "When up to date, skip divergence and print manual redeploy guidance" required: true default: false type: boolean @@ -105,13 +105,11 @@ jobs: if [ "$MAIN_SHA" = "$RELEASE_SHA" ]; then if [ "$FORCE_REDEPLOY" = "true" ]; then - git checkout -B "$BRANCH" "origin/$BRANCH" - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git commit --allow-empty -m "chore: force redeploy trigger for $BRANCH" - git push origin "HEAD:refs/heads/$BRANCH" { - echo "- $BRANCH: force redeploy commit created" + echo "- $BRANCH: already up to date" + echo " - force_redeploy=true requested" + echo " - skipped empty commit to keep release branch ancestry clean" + echo " - trigger redeploy manually in Vercel if needed" } >> "$GITHUB_STEP_SUMMARY" continue fi @@ -123,11 +121,12 @@ jobs: fi if ! git merge-base --is-ancestor "origin/$BRANCH" origin/main; then - echo "$BRANCH is not an ancestor of main. Resolve release history before promotion." >&2 - exit 1 + { + echo "- $BRANCH: non-ancestor detected, forcing reset to main" + } >> "$GITHUB_STEP_SUMMARY" fi - git push origin origin/main:"refs/heads/$BRANCH" + git push --force-with-lease origin origin/main:"refs/heads/$BRANCH" { echo "- $BRANCH: updated" } >> "$GITHUB_STEP_SUMMARY"