From 9b4438719156264dcb55f3c1d23177b60bff6048 Mon Sep 17 00:00:00 2001 From: "shanming.sun" Date: Sat, 8 Jun 2024 22:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yaml | 6 +++--- test.sh | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 test.sh diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index fc6fec9..d7961ac 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -30,10 +30,10 @@ jobs: sh pull.sh data=`cat trigger.txt` - if [-z $MM_NOTIFY_URL ];then - echo 'MM_NOTIFY_URL not set' - else + if [ $MM_NOTIFY_URL ];then curl -H 'Content-Type: application/json' \ -d "{\"msgtype\": \"text\",\"text\": {\"content\":\"同步成功 $data \"}}" \ $MM_NOTIFY_URL + else + echo 'MM_NOTIFY_URL not set' fi diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..516197d --- /dev/null +++ b/test.sh @@ -0,0 +1,10 @@ + +MM_NOTIFY_URL="" +data=`cat trigger.txt` +if [ $MM_NOTIFY_URL ];then + curl -H 'Content-Type: application/json' \ + -d "{\"msgtype\": \"text\",\"text\": {\"content\":\"同步成功 $data \"}}" \ + $MM_NOTIFY_URL +else + echo 'MM_NOTIFY_URL not set' +fi \ No newline at end of file