mirror of
https://git.fightbot.fun/hxuanyu/FileRelay.git
synced 2026-02-15 10:11:43 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2cb52a0a80 | |||
| 0c4a5bbee6 | |||
| 7c3f91598d | |||
| 3601e59923 | |||
| a49ed2a54a |
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -35,3 +35,25 @@ 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
|
||||
echo "Response:"
|
||||
eval "$line -w \"\\nHTTP Status: %{http_code}\\n\"" || true
|
||||
else
|
||||
eval "$line" || true
|
||||
fi
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ services:
|
||||
- "${HOST_PORT:-8080}:${FR_SITE_PORT:-8080}"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- ./data/config:/app/config
|
||||
environment:
|
||||
- TZ=${TZ:-Asia/Shanghai}
|
||||
- FR_SITE_NAME=${FR_SITE_NAME:-文件暂存柜}
|
||||
|
||||
2
main.go
2
main.go
@@ -67,7 +67,7 @@ func main() {
|
||||
mime.AddExtensionType(".svg", "image/svg+xml")
|
||||
|
||||
// 解析命令行参数
|
||||
configPath := flag.String("config", "config/config.yaml", "path to config file")
|
||||
configPath := flag.String("config", "data/config/config.yaml", "path to config file")
|
||||
flag.Parse()
|
||||
|
||||
// 1. 加载配置
|
||||
|
||||
Reference in New Issue
Block a user