Skip to content

Commit 6bbcae6

Browse files
committed
chore: release 승격 워크플로우에 강제 재배포 옵션 추가 (#441)
1 parent f3541dd commit 6bbcae6

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
- both
1616
- web
1717
- admin
18+
force_redeploy:
19+
description: "Create empty commit when release branch is already up to date"
20+
required: true
21+
default: false
22+
type: boolean
1823

1924
jobs:
2025
generate_tag:
@@ -57,6 +62,7 @@ jobs:
5762
MAIN_SHA=$(git rev-parse origin/main)
5863
5964
TARGET="${{ github.event.inputs.target }}"
65+
FORCE_REDEPLOY="${{ github.event.inputs.force_redeploy }}"
6066
6167
case "$TARGET" in
6268
web)
@@ -98,6 +104,18 @@ jobs:
98104
fi
99105
100106
if [ "$MAIN_SHA" = "$RELEASE_SHA" ]; then
107+
if [ "$FORCE_REDEPLOY" = "true" ]; then
108+
git checkout -B "$BRANCH" "origin/$BRANCH"
109+
git config user.name "github-actions[bot]"
110+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
111+
git commit --allow-empty -m "chore: force redeploy trigger for $BRANCH"
112+
git push origin "HEAD:refs/heads/$BRANCH"
113+
{
114+
echo "- $BRANCH: force redeploy commit created"
115+
} >> "$GITHUB_STEP_SUMMARY"
116+
continue
117+
fi
118+
101119
{
102120
echo "- $BRANCH: already up to date"
103121
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)