Skip to content

Commit e23b937

Browse files
committed
fix: 디스코드 알림 내용 수정
1 parent e52ef95 commit e23b937

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,36 @@ jobs:
173173
cluster: ${{ env.ECS_CLUSTER }}
174174
wait-for-service-stability: true
175175

176+
- name: Prepare Notification Info
177+
id: vars
178+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
179+
176180
- name: Discord Notify (Success)
177181
if: success()
178-
run: |
179-
curl -H "Content-Type: application/json" \
180-
-X POST \
181-
-d "{\"content\": \"✅ (개발 서버) 새로운 버전이 배포 되었어요!\n레포: ${GITHUB_REPOSITORY}\n브랜치: ${GITHUB_REF}\n버전: ${SEMANTIC_VERSION}\"}" \
182-
${{ secrets.DISCORD_WEBHOOK }}
182+
uses: tsickert/[email protected]
183+
with:
184+
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
185+
embed-title: "✅ 프로덕션 배포 성공!"
186+
embed-color: 65280
187+
embed-description: |
188+
새로운 버전이 성공적으로 배포되었습니다.
189+
190+
**버전**: [v${{ env.SEMANTIC_VERSION }}](${{ github.server_url }}/${{ github.repository }}/releases/tag/v${{ env.SEMANTIC_VERSION }})
191+
**커밋**: [${{ steps.vars.outputs.sha_short }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
192+
**배포자**: ${{ github.actor }}
193+
embed-url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
183194

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

0 commit comments

Comments
 (0)