Merge pull request #3 from hanxuanyu/bugfix/docker-compose-config-exception

添加通知步骤到构建工作流
This commit is contained in:
2026-01-29 19:12:51 +08:00
committed by GitHub

View File

@@ -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