From 0eb86745bd1602094d14a63197038fc0164abc62 Mon Sep 17 00:00:00 2001 From: seungki1011 Date: Sat, 7 Sep 2024 19:31:55 +0900 Subject: [PATCH] =?UTF-8?q?Infra:=208398a7/action-slack@v3=EB=A5=BC=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b222aee..e7849eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,16 +53,26 @@ jobs: # 6. 슬랙 채널로 빌드의 성공 또는 실패에 따라 알림 보내기 - name: Slack message with build result - if: success() || failure() - uses: slackapi/slack-github-action@v1.27.0 + 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/slack-github-action@v1.27.0 +# 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 참고