Skip to content

Commit

Permalink
Infra: 8398a7/action-slack@v3를 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
seungki1011 committed Sep 7, 2024
1 parent 904e91d commit 0eb8674
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,26 @@ jobs:

# 6. 슬랙 채널로 빌드의 성공 또는 실패에 따라 알림 보내기
- name: Slack message with build result
if: success() || failure()
uses: slackapi/[email protected]
if: always() # 이전의 Step들의 성공과 실패 여부에 상관 없이 항상 실행
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
if_mention: failure,cancelled
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
PULL_REQUEST_JOB_STATUS: ${{ job.status }}
PULL_REQUEST_JOB_STATUS_COLOR: ${{ job.status == 'success' && vars.COLOR_GREEN || job.status == 'failure' && vars.COLOR_RED || vars.COLOR_ORANGE }}
with:
channel-id: C07L4BQTKGE
payload-file-path: ./slack/ci_slack_message.json

# - name: Slack message with build result
# if: success() || failure()
# uses: slackapi/[email protected]
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
# PULL_REQUEST_JOB_STATUS: ${{ job.status }}
# PULL_REQUEST_JOB_STATUS_COLOR: ${{ job.status == 'success' && vars.COLOR_GREEN || job.status == 'failure' && vars.COLOR_RED || vars.COLOR_ORANGE }}
# with:
# channel-id: C07L4BQTKGE
# payload-file-path: ./slack/ci_slack_message.json

# --- 아래 방법은 버그 발생 ---
# https://github.com/slackapi/slack-github-action/issues/203 참고
Expand Down

0 comments on commit 0eb8674

Please sign in to comment.