From 7c3f91598d406aa1895323c8b13f4552709036e2 Mon Sep 17 00:00:00 2001 From: hanxuanyu <2252193204@qq.com> Date: Thu, 29 Jan 2026 19:11:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=9A=E7=9F=A5=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E5=88=B0=E6=9E=84=E5=BB=BA=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33bdf10..62d1451 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,3 +35,24 @@ jobs: - name: Build Go run: go build -v . + - name: Notification + if: success() + env: + NOTIFY_CURLS: ${{ secrets.NOTIFY_CURLS }} + run: | + if [ -n "$NOTIFY_CURLS" ]; then + printf "%s\n" "$NOTIFY_CURLS" | while read -r line; do + if [ -n "$line" ]; then + if [[ "$line" =~ ^[0-9] ]]; then + echo "Pausing for $line ms..." + sleep "$(awk "BEGIN {print $line/1000}")" || true + elif [[ "$line" == curl* ]]; then + eval "$line -w \"\\nHTTP Status: %{http_code}\\n\"" || true + else + eval "$line" || true + fi + echo "" + fi + done + fi +