Skip to content

Commit 47063ae

Browse files
committed
fix: 알림 내용 수정
1 parent b320e55 commit 47063ae

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,18 +190,36 @@ jobs:
190190
env:
191191
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
192192

193+
- name: Prepare Notification Info
194+
id: vars
195+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
196+
193197
- name: Discord Notify (Success)
194198
if: success()
195-
run: |
196-
curl -H "Content-Type: application/json" \
197-
-X POST \
198-
-d "{\"content\": \"✅ (프로덕션 서버) 새로운 버전이 배포 되었어요!\n레포: ${GITHUB_REPOSITORY}\n브랜치: ${GITHUB_REF}\n버전: ${SEMANTIC_VERSION}\"}" \
199-
${{ secrets.DISCORD_WEBHOOK }}
199+
uses: tsickert/[email protected]
200+
with:
201+
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
202+
embed-title: "✅ 프로덕션 서버 배포 성공!"
203+
embed-color: 65280
204+
embed-description: |
205+
새로운 버전이 성공적으로 배포되었습니다.
206+
207+
**버전**: [v${{ env.SEMANTIC_VERSION }}](${{ github.server_url }}/${{ github.repository }}/releases/tag/v${{ env.SEMANTIC_VERSION }})
208+
**커밋**: [${{ steps.vars.outputs.sha_short }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
209+
**배포자**: ${{ github.actor }}
210+
embed-url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
200211

201212
- name: Discord Notify (Failure)
202213
if: failure()
203-
run: |
204-
curl -H "Content-Type: application/json" \
205-
-X POST \
206-
-d "{\"content\": \"❌ (프로덕션 서버) 배포 실패!\n레포: ${GITHUB_REPOSITORY}\n브랜치: ${GITHUB_REF}\n버전: ${SEMANTIC_VERSION}\"}" \
207-
${{ secrets.DISCORD_WEBHOOK }}
214+
uses: tsickert/[email protected]
215+
with:
216+
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
217+
embed-title: "❌ 프로덕션 서버 배포 실패!"
218+
embed-color: 16711680
219+
embed-description: |
220+
배포 과정 중 오류가 발생했습니다. 아래 링크에서 로그를 확인하세요.
221+
222+
**시도 버전**: ${{ env.SEMANTIC_VERSION }}
223+
**커밋**: [${{ steps.vars.outputs.sha_short }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
224+
**요청자**: ${{ github.actor }}
225+
embed-url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

0 commit comments

Comments
 (0)