From 27ad7eba2f835e76f64bcd2e32221571d43e2b93 Mon Sep 17 00:00:00 2001 From: "kihwan.song" Date: Wed, 29 Apr 2026 10:10:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8A=AC=EB=9E=99=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EC=BB=A4=EB=B0=8B=EB=A9=94=EC=84=B8?= =?UTF-8?q?=EC=A7=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notify-slack/action.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/notify-slack/action.yml b/notify-slack/action.yml index 9fb76f4..e59bac9 100644 --- a/notify-slack/action.yml +++ b/notify-slack/action.yml @@ -14,11 +14,20 @@ runs: ACTOR: ${{ gitea.actor }} RUN_NUMBER: ${{ gitea.run_number }} SHA: ${{ gitea.sha }} + COMMIT_MSG: ${{ gitea.event.head_commit.message }} run: | set -eu SHORT_SHA="${SHA:0:7}" STATUS_URL="https://status.gitea.pitap.at/${REPO}/actions/runs/${RUN_NUMBER}" - COMMIT_MSG="$(git log -1 --pretty=format:%s 2>/dev/null || echo '(no message)')" + + # 이벤트에서 못 받았으면 (수동 trigger 등) git에서 시도, 그것도 실패하면 fallback + if [ -z "${COMMIT_MSG:-}" ]; then + COMMIT_MSG="$(git log -1 --pretty=format:%s 2>/dev/null || echo '(no message)')" + fi + + # 멀티라인 커밋 메시지면 첫 줄만 + COMMIT_MSG="$(printf '%s' "$COMMIT_MSG" | head -n1)" + HEADER_TEXT="🚀 배포 시작 — ${REPO}" PAYLOAD=$(jq -n \