feat: add binarry download
This commit is contained in:
@@ -10,6 +10,45 @@ env:
|
||||
IMAGE_NAME: baihu
|
||||
|
||||
jobs:
|
||||
build-binaries:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Build Web
|
||||
run: make build-web
|
||||
|
||||
- name: Build Binaries
|
||||
run: |
|
||||
VERSION=${{ github.ref_name }}
|
||||
BUILD_TIME=$(TZ='Asia/Shanghai' date '+%Y/%m/%d %H:%M:%S')
|
||||
LDFLAGS="-s -w -X 'github.com/engigu/baihu-panel/internal/constant.Version=$VERSION' -X 'github.com/engigu/baihu-panel/internal/constant.BuildTime=$BUILD_TIME'"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$LDFLAGS" -o baihu-linux-amd64 main.go
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$LDFLAGS" -o baihu-linux-arm64 main.go
|
||||
|
||||
- name: Build Agent Binaries
|
||||
run: make build-agent
|
||||
|
||||
- name: Upload Binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: baihu-binaries
|
||||
path: |
|
||||
baihu-linux-amd64
|
||||
baihu-linux-arm64
|
||||
data/agent/baihu-agent-*
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@@ -115,7 +154,7 @@ jobs:
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [build, build-binaries]
|
||||
strategy:
|
||||
matrix:
|
||||
base_type: [debian, debian13]
|
||||
@@ -172,6 +211,13 @@ jobs:
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
|
||||
|
||||
- name: Download Binaries
|
||||
if: matrix.base_type == 'debian'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: baihu-binaries
|
||||
path: .
|
||||
|
||||
- name: Create GitHub Release
|
||||
if: matrix.base_type == 'debian'
|
||||
uses: softprops/action-gh-release@v2
|
||||
@@ -179,3 +225,7 @@ jobs:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
body_path: CHANGELOG.md
|
||||
append_body: true # 追加模式:保留已有说明,在后面添加 CHANGELOG.md
|
||||
files: |
|
||||
baihu-linux-amd64
|
||||
baihu-linux-arm64
|
||||
data/agent/baihu-agent-*
|
||||
|
||||
+23
-2
@@ -1,11 +1,32 @@
|
||||
> 出于shell执行的安全考虑,目前仅支持和推荐使用 Docker/Compose 部署方式。[镜像地址](https://github.com/engigu/baihu-panel/pkgs/container/baihu)
|
||||
> 出于安全及环境隔离考虑,推荐使用 Docker/Compose 部署方式。[镜像地址](https://github.com/engigu/baihu-panel/pkgs/container/baihu)
|
||||
|
||||
## 快速部署
|
||||
|
||||
### 🐳 方式一:Docker 部署(推荐)
|
||||
[部署文档](https://github.com/engigu/baihu-panel?tab=readme-ov-file#%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2)
|
||||
|
||||
### 🚀 方式二:单文件部署
|
||||
从当前 Release 的附件中下载对应架构的单文件可执行程序(`baihu-linux-amd64` 或 `baihu-linux-arm64`)。
|
||||
|
||||
**⚠️ 重要前置依赖:手动安装 `mise`**
|
||||
单文件直接运行依赖宿主机系统环境,请务必先安装 [mise](https://mise.jdx.dev/getting-started.html) 供任务调度及环境管理使用:
|
||||
```bash
|
||||
curl https://mise.run | sh
|
||||
export PATH="~/.local/share/mise/bin:~/.local/share/mise/shims:$PATH"
|
||||
```
|
||||
|
||||
**运行面板:**
|
||||
```bash
|
||||
chmod +x baihu-linux-amd64
|
||||
./baihu-linux-amd64
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**访问面板:**
|
||||
启动后访问:http://localhost:8052
|
||||
|
||||
默认账号:用户名 `admin`,密码见启动日志(首次启动随机生成)
|
||||
**登录信息:**
|
||||
默认账号:用户名 `admin`,密码见面板首次启动时的控制台日志。
|
||||
|
||||
|
||||
|
||||
@@ -544,6 +544,13 @@ onUnmounted(() => {
|
||||
<DialogDescription>当前版本: {{ agentVersion }}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div class="space-y-4">
|
||||
<div class="bg-blue-500/10 text-blue-600 dark:text-blue-400 p-3 rounded-md text-sm border border-blue-500/20">
|
||||
<p class="font-medium mb-1">💡 下载说明:</p>
|
||||
<ul class="list-disc list-inside space-y-1 text-xs opacity-90">
|
||||
<li>若主程序为 <strong class="font-semibold">Docker 部署</strong>:支持直接在此处下载包含配置的自动打包程序。</li>
|
||||
<li>若主程序为 <strong class="font-semibold">单文件二进制部署</strong>:面板无法直接提供完整打包下载,请前往 <a href="https://github.com/engigu/baihu-panel/releases" target="_blank" class="underline font-medium hover:text-blue-500 transition-colors">GitHub Releases</a> 手动下载对应的 Agent。</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="space-y-2">
|
||||
<div v-for="platform in platforms" :key="`${platform.os}-${platform.arch}`"
|
||||
class="flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors">
|
||||
|
||||
Reference in New Issue
Block a user