Compare commits

2 Commits

Author SHA1 Message Date
0c4a5bbee6 Merge pull request #3 from hanxuanyu/bugfix/docker-compose-config-exception
添加通知步骤到构建工作流
2026-01-29 19:12:51 +08:00
7c3f91598d 添加通知步骤到构建工作流 2026-01-29 19:11:43 +08:00

View File

@@ -35,3 +35,24 @@ jobs:
- name: Build Go - name: Build Go
run: go build -v . 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