Skip to content

Commit

Permalink
fix: modify env
Browse files Browse the repository at this point in the history
  • Loading branch information
mailth committed Oct 9, 2024
1 parent 96c2aee commit 9e0797a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
go-version: "stable" # 使用你需要的 Go 版本

- name: Build
- name: Build
run: |
go build -o clashmerge .
Expand All @@ -39,7 +39,7 @@ jobs:
run: |
TAG=${GITHUB_REF#refs/tags/}
if [[ "$TAG" == *-beta.* ]]; then
docker buildx build --platform linux/amd64 -t mailth/clashmerge:$TAG --push .
docker buildx build --platform linux/amd64,linux/arm64 -t mailth/clashmerge:$TAG --push .
else
docker buildx build --platform linux/amd64 -t mailth/clashmerge:$TAG -t mailth/clashmerge:latest --push .
docker buildx build --platform linux/amd64,linux/arm64 -t mailth/clashmerge:$TAG -t mailth/clashmerge:latest --push .
fi
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ func Init() error {
// 设置日志输出前缀
configDir = os.Getenv("CONFID_DIR")
if configDir == "" {
configDir = "./config"
configDir = "/data"
}
logrustool.SetLevel()
// 创建日志目录
logrustool.SetRotateSimple("./log/errors.log")
logrustool.SetRotateSimple(filepath.Join(configDir, "/log/errors.log"))
// 设置日志输出文件
return nil
}
Expand Down

0 comments on commit 9e0797a

Please sign in to comment.