Skip to content

Commit 0a3449f

Browse files
committed
ci: update workflows
1 parent 2b66a03 commit 0a3449f

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,39 @@ jobs:
2727
private_key: ${{ secrets.APP_PRIVATE_KEY }}
2828
installation_id: ${{ secrets.APP_INSTALLATION_ID }}
2929

30-
- name: Create Release PR Branch
30+
- name: Create branch and PR
3131
run: |
3232
git config --global user.name "GitHub Actions"
3333
git config --global user.email "[email protected]"
3434
35-
# 현재 날짜와 시간을 포함한 고유한 브랜치 이름 생성
35+
# 고유한 브랜치 이름 생성
3636
BRANCH_NAME="sync-main-to-release-$(date +'%Y%m%d-%H%M%S')"
3737
git checkout -b $BRANCH_NAME
3838
3939
# GitHub App 토큰을 사용하여 브랜치 푸시
4040
git remote set-url origin https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/${{ github.repository }}
4141
git push origin $BRANCH_NAME
4242
43-
# 변경 내용 요약
44-
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
45-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
46-
echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
47-
4843
- name: Create Pull Request
44+
id: create_pr
4945
uses: peter-evans/create-pull-request@v5
5046
with:
5147
token: ${{ steps.generate-token.outputs.token }}
48+
commit-message: 'chore: sync main to release'
49+
branch: sync-main-to-release-$(date +'%Y%m%d-%H%M%S')
50+
delete-branch: false
5251
base: release
53-
branch: ${{ env.BRANCH_NAME }}
5452
title: 'chore: sync main to release'
5553
body: |
5654
이 PR은 메인 브랜치의 변경사항을 릴리즈 브랜치로 동기화합니다.
5755
58-
## 주요 변경사항:
59-
${{ env.COMMIT_MESSAGE }}
60-
6156
이 PR이 머지되면 릴리즈 워크플로우가 자동으로 트리거됩니다.
6257
labels: |
6358
automated-pr
6459
sync-to-release
60+
61+
- name: PR Details
62+
if: steps.create_pr.outputs.pull-request-number
63+
run: |
64+
echo "::notice::Pull Request created: #${{ steps.create_pr.outputs.pull-request-number }}"
65+
echo "::notice::View it here: ${{ steps.create_pr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)