문법 오류 수정. 레포 이름 개선
This commit is contained in:
@@ -45,7 +45,7 @@ jobs:
|
||||
|
||||
notify_status() {
|
||||
local status="$1" repo="$2" branch="$3" mode="$4" start_epoch="$5" extra="${6:-}"
|
||||
local ts end_epoch duration text
|
||||
local ts end_epoch duration text payload
|
||||
[[ -z "${NOTIFY_WEBHOOK}" ]] && return
|
||||
ts=$(TZ=Asia/Seoul date '+%Y-%m-%d %H:%M:%S %Z')
|
||||
case "${status}" in
|
||||
@@ -66,16 +66,11 @@ jobs:
|
||||
text="센터Git ${repo} 상태: ${status} (${ts})"
|
||||
;;
|
||||
esac
|
||||
cat <<EOF | curl -sS -i -X POST \
|
||||
payload=${text//\"/\\\"}
|
||||
curl -sS -i -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @- \
|
||||
-d "{\"username\":\"Gitea\",\"icon_url\":\"https://gitea.hmac.kr/assets/img/logo.svg\",\"text\":\"${payload}\"}" \
|
||||
"${NOTIFY_WEBHOOK}" >/dev/null || echo "::warning::Notification failed for ${repo} (${status})"
|
||||
{
|
||||
"username": "Gitea",
|
||||
"icon_url": "https://gitea.hmac.kr/assets/img/logo.svg",
|
||||
"text": "${text}"
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
set_default_branch_main() {
|
||||
@@ -128,6 +123,10 @@ EOF
|
||||
repo_name="base"
|
||||
elif [[ "${branch_name}" == "Develop_Net8_"* ]]; then
|
||||
repo_name="${branch_name#Develop_Net8_}"
|
||||
elif [[ "${branch_name}" == "Develop_"* ]]; then
|
||||
repo_name="${branch_name#Develop_}"
|
||||
elif [[ "${branch_name}" == "develop_"* ]]; then
|
||||
repo_name="${branch_name#develop_}"
|
||||
fi
|
||||
echo "Target repository name: ${repo_name}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user