mirror of
https://git.fightbot.fun/hxuanyu/FileRelay.git
synced 2026-02-15 07:21:44 +08:00
Merge pull request #3 from hanxuanyu/bugfix/docker-compose-config-exception
添加通知步骤到构建工作流
This commit is contained in:
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user