Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/develop_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,29 @@ jobs:
echo "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
docker compose up -d
docker image prune -a -f

# 슬랙으로 알림 전송
- name: Send to slack notification
uses: slackapi/slack-github-action@v2.1.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "Build and Deploy result"
blocks:
- type: section
text:
type: mrkdwn
text: "*✅ 배포 완료 알림*"
- type: section
text:
type: mrkdwn
text: "*실행 로그:* 🔗 <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>"
- type: context
elements:
- type: mrkdwn
text: "*브랜치:* `${{ github.ref_name }}`"
- type: mrkdwn
text: "*커밋:* `${{ github.sha }}`"
- type: divider
28 changes: 27 additions & 1 deletion .github/workflows/develop_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,30 @@ jobs:
script: |
echo "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
docker compose up -d
docker image prune -a -f
docker image prune -a -f

# 슬랙으로 알림 전송
- name: Send to slack notification
uses: slackapi/slack-github-action@v2.1.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "Build and Deploy result"
blocks:
- type: section
text:
type: mrkdwn
text: "*✅ 배포 완료 알림*"
- type: section
text:
type: mrkdwn
text: "*실행 로그:* 🔗 <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>"
- type: context
elements:
- type: mrkdwn
text: "*브랜치:* `${{ github.ref_name }}`"
- type: mrkdwn
text: "*커밋:* `${{ github.event.inputs.commit_hash }}`"
- type: divider
33 changes: 32 additions & 1 deletion .github/workflows/develop_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
strategy:
matrix:
java-version: [ 17 ]
distribution: [ 'temurin' ]

steps:
- name: Checkout code
Expand All @@ -24,7 +25,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
distribution: ${{ matrix.distribution }}

- name: Run MySQL with Docker
run: |
Expand All @@ -47,3 +48,33 @@ jobs:

- name: Run Gradle Check
run: ./gradlew check

# 슬랙으로 알림 전송
- name: Send to slack notification
uses: slackapi/slack-github-action@v2.1.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "PR event"
blocks:
- type: section
text:
type: mrkdwn
text: "${{ secrets.SLACK_GROUP_MENTION }}\n\n📌 *PR 이벤트 알림 (<${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }}>)*"
- type: section
text:
type: mrkdwn
text: "> PR 이벤트 알림입니다.\n> *최신 변경 사항 검토*, *코드 리뷰* 부탁드립니다."
- type: section
text:
type: mrkdwn
text: "*PR:* 🔗 <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>"
- type: context
elements:
- type: mrkdwn
text: "*브랜치:* `${{ github.head_ref }}` -> `${{ github.base_ref }}`"
- type: mrkdwn
text: "*작성자:* ${{ github.event.pull_request.user.login }}"
- type: divider
56 changes: 56 additions & 0 deletions .github/workflows/notify_pull_request_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: pull request Review notify

on:
pull_request_review:
types: [ "submitted" ]

jobs:
notify_reveiw:
runs-on: ubuntu-latest
steps:
- name: Set review state
id: set-state
env:
REVIEW_STATE: ${{ github.event.review.state }}
PR_LINK: "<${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }}>"
SLACK_MENTION: ${{ secrets.SLACK_GROUP_MENTION }}
run: |
state="💬 *PR 코멘트 알림 ($PR_LINK)*"

if [[ "$REVIEW_STATE" == "approved" ]]; then
state="$SLACK_MENTION\n\n✅ *PR 승인 알림 ($PR_LINK)*"
elif [[ "$REVIEW_STATE" == "changes_requested" ]]; then
state="$SLACK_MENTION\n\n🛠️ *PR 변경 요청 알림 ($PR_LINK)*"
fi

echo "state=$state" >> $GITHUB_OUTPUT

# 슬랙으로 알림 전송
- name: Send to slack notification
uses: slackapi/slack-github-action@v2.1.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "Add PR review"
blocks:
- type: section
text:
type: mrkdwn
text: "${{ steps.set-state.outputs.state }}"
- type: section
text:
type: mrkdwn
text: "> _${{ github.event.review.body }}_"
- type: section
text:
type: mrkdwn
text: "*PR:* 🔗 <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>"
- type: context
elements:
- type: mrkdwn
text: "*리뷰 상태:* `${{ github.event.review.state }}`"
- type: mrkdwn
text: "*리뷰어:* ${{ github.event.review.user.login }}"
- type: divider