Skip to content

Commit 0d1bb56

Browse files
Merge pull request #18 from Queryus/feature/pipeline
파이프라인 코드 수정
2 parents e2cbdf8 + 8076705 commit 0d1bb56

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.github/workflows/build_executables.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
# 파이프라인 시작 알림
1212
# ==================================
1313
start:
14+
if: github.event_name == 'release'
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Send Pipeline Start Notification
@@ -60,6 +61,7 @@ jobs:
6061

6162
release:
6263
needs: build
64+
if: github.event_name == 'release'
6365
runs-on: ubuntu-latest
6466
permissions:
6567
contents: write
@@ -103,9 +105,9 @@ jobs:
103105
# 파이프라인 최종 결과 알림
104106
# ==================================
105107
finish:
106-
needs: deploy
108+
needs: release
107109
runs-on: ubuntu-latest
108-
if: always()
110+
if: always() && github.event_name == 'release'
109111

110112
steps:
111113
- name: Send Success Notification

.github/workflows/pr_bot.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
types: [opened, closed, reopened, synchronize]
88
issue_comment:
99
types: [created]
10+
pull_request_review:
11+
types: [submitted]
12+
pull_request_review_comment:
13+
types: [created]
1014

1115
jobs:
1216
notify:
@@ -84,3 +88,41 @@ jobs:
8488
}]
8589
}' \
8690
${{ secrets.DISCORD_WEBHOOK_URL }}
91+
92+
# ----------------------------
93+
# 리뷰 제출(Submit Review) 알림
94+
# ----------------------------
95+
- name: Send Review Submitted Notification
96+
if: github.event_name == 'pull_request_review' && github.event.action == 'submitted'
97+
run: |
98+
REVIEW_BODY=$(echo "${{ github.event.review.body }}" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
99+
curl -X POST -H "Content-Type: application/json" \
100+
-d "{
101+
\"username\": \"GitHub 리뷰 봇\",
102+
\"embeds\": [{
103+
\"title\": \"New Review on PR #${{ github.event.pull_request.number }}\",
104+
\"description\": \"**${{ github.actor }}**님이 리뷰를 남겼습니다: \\n${REVIEW_BODY}\",
105+
\"url\": \"${{ github.event.review.html_url }}\",
106+
\"color\": 16776960
107+
}]
108+
}" \
109+
${{ secrets.DISCORD_WEBHOOK_URL }}
110+
111+
# -------------------------
112+
# 리뷰 댓글에 대한 답글 알림
113+
# -------------------------
114+
- name: Send Review Comment Notification
115+
if: github.event_name == 'pull_request_review_comment' && github.event.action == 'created'
116+
run: |
117+
COMMENT_BODY=$(echo "${{ github.event.comment.body }}" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
118+
curl -X POST -H "Content-Type: application/json" \
119+
-d "{
120+
\"username\": \"GitHub 댓글 봇\",
121+
\"embeds\": [{
122+
\"title\": \"New Reply on PR #${{ github.event.pull_request.number }}\",
123+
\"description\": \"**${{ github.actor }}**님의 새 답글: \\n${COMMENT_BODY}\",
124+
\"url\": \"${{ github.event.comment.html_url }}\",
125+
\"color\": 15105570
126+
}]
127+
}" \
128+
${{ secrets.DISCORD_WEBHOOK_URL }}

0 commit comments

Comments
 (0)