Skip to content

Commit d890adc

Browse files
committed
chore: 배포 후 discord 에 알림 발송
1 parent 427a730 commit d890adc

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/distribute.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,32 @@ jobs:
100100
env:
101101
GOOGLE_APPLICATION_CREDENTIALS: app/firebase-service-account.json
102102
RELEASE_NOTES: ${{ steps.notes.outputs.value }}
103+
104+
- name: Notify Discord
105+
if: always()
106+
run: |
107+
STATUS="${{ job.status }}"
108+
if [ "$STATUS" = "success" ]; then
109+
COLOR=3066993
110+
TITLE="✅ 배포 성공"
111+
else
112+
COLOR=15158332
113+
TITLE="❌ 배포 실패"
114+
fi
115+
curl -s -X POST \
116+
"${{ secrets.DISCORD_WEBHOOK_URL }}?thread_id=1472574231303684147" \
117+
-H "Content-Type: application/json" \
118+
-d "{
119+
\"embeds\": [{
120+
\"title\": \"$TITLE\",
121+
\"color\": $COLOR,
122+
\"fields\": [
123+
{ \"name\": \"빌드 타입\", \"value\": \"${{ github.event.inputs.build_type }}\", \"inline\": true },
124+
{ \"name\": \"브랜치\", \"value\": \"${{ github.ref_name }}\", \"inline\": true },
125+
{ \"name\": \"실행자\", \"value\": \"${{ github.actor }}\", \"inline\": true },
126+
{ \"name\": \"릴리스 노트\", \"value\": \"$RELEASE_NOTES\" }
127+
]
128+
}]
129+
}"
130+
env:
131+
RELEASE_NOTES: ${{ steps.notes.outputs.value }}

0 commit comments

Comments
 (0)