슬랙 스크립트 커밋메세지 수정

This commit is contained in:
2026-04-29 10:10:01 +09:00
parent 73ff43f0f1
commit 27ad7eba2f

View File

@@ -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}"
# 이벤트에서 못 받았으면 (수동 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 \