From 8b89e721ce96c5fecf77ef41e32ea644af94b1c2 Mon Sep 17 00:00:00 2001 From: yoonseo Date: Wed, 7 Oct 2026 19:03:23 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20backend=EC=9A=A9=20discord=20webhook?= =?UTF-8?q?=20workflow=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/discord-notify.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/discord-notify.yml diff --git a/.github/workflows/discord-notify.yml b/.github/workflows/discord-notify.yml new file mode 100644 index 0000000..8fb59ea --- /dev/null +++ b/.github/workflows/discord-notify.yml @@ -0,0 +1,27 @@ +name: Discord notify + +# 이슈, PR, CI/CD 실패를 Discord로 알림. 실제 로직은 Han-Spoon/.github의 공용 workflow을 사용. +on: + issues: + types: [opened, reopened] + # fork PR에서도 secret을 쓰기 위해 pull_request_target 사용 + pull_request_target: + types: [opened, reopened, ready_for_review, closed] + workflow_run: + workflows: ["CI", "Deploy (prod)"] # 주의: 각 workflow의 name과 일치해야 함 + types: [completed] + +permissions: + actions: read # 실패 job/step 조회 + contents: read + pull-requests: read + +jobs: + notify: + # CI/CD는 실패한 경우에만 알림 + if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'failure' + uses: Han-Spoon/.github/.github/workflows/discord-notify.yml@main + with: + team: Backend + secrets: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}