Skip to content

Commit 5ec7b8f

Browse files
committed
fix: curl 사용
1 parent a7d5ca4 commit 5ec7b8f

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

.github/workflows/deployment-notification.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,34 @@ jobs:
1111
if: github.repository == 'depromeet/16th-team3-FE'
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Send Discord Embed Notification
15-
uses: Ilshidur/action-discord@master
14+
- name: Send Discord Notification via curl
1615
env:
17-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
18-
with:
19-
args: >-
20-
--raw '{
21-
"embeds": [{
22-
"title": "📦 Vercel 배포 알림",
23-
"description": "`main` 브랜치에 새로운 커밋이 푸시되어 Vercel 배포가 시작되었습니다!",
24-
"color": 3447003,
25-
"fields": [
26-
{
27-
"name": "📝 커밋 메시지",
28-
"value": "${{ github.event.head_commit.message }}"
29-
},
30-
{
31-
"name": "👤 작성자",
32-
"value": "${{ github.actor }}"
33-
},
34-
{
35-
"name": "🔗 커밋 링크",
36-
"value": "https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
37-
}
38-
]
39-
}]
40-
}'
16+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
17+
GITHUB_ACTOR: ${{ github.actor }}
18+
COMMIT_MSG: ${{ github.event.head_commit.message }}
19+
COMMIT_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
20+
BRANCH_NAME: ${{ github.ref_name }}
21+
run: |
22+
curl -H "Content-Type: application/json" \
23+
-X POST "$DISCORD_WEBHOOK_URL" \
24+
-d '{
25+
"embeds": [{
26+
"title": "📦 Vercel 배포 알림",
27+
"description": "'"${BRANCH_NAME}"' 브랜치에 새로운 커밋이 푸시되어 Vercel 배포가 시작되었습니다!",
28+
"color": 3447003,
29+
"fields": [
30+
{
31+
"name": "📝 커밋 메시지",
32+
"value": "'"${COMMIT_MSG}"'"
33+
},
34+
{
35+
"name": "👤 작성자",
36+
"value": "'"${GITHUB_ACTOR}"'"
37+
},
38+
{
39+
"name": "🔗 커밋 링크",
40+
"value": "'"${COMMIT_URL}"'"
41+
}
42+
]
43+
}]
44+
}'

0 commit comments

Comments
 (0)