Skip to content

Commit c58d314

Browse files
committed
chore: migrate CI and dependencies to boa-z
1 parent 2232452 commit c58d314

287 files changed

Lines changed: 2871 additions & 690 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/binary-release.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,6 @@ jobs:
7979
go-version-file: go.mod
8080
cache: true
8181

82-
- name: Configure Git for private modules
83-
env:
84-
GH_PAT: ${{ secrets.GH_PAT }}
85-
run: |
86-
if [ -n "${GH_PAT}" ]; then
87-
git config --global url."https://x-access-token:${GH_PAT}@github.com/iniwex5/".insteadOf "https://github.com/iniwex5/"
88-
go env -w GOPRIVATE=github.com/iniwex5/*
89-
fi
90-
9182
- name: Prepare build vars
9283
id: vars
9384
shell: bash
@@ -134,7 +125,7 @@ jobs:
134125
mkdir -p dist
135126
CGO_ENABLED=0 GOOS=linux GOARCH=${{ matrix.goarch }} GOARM=${{ matrix.goarm }} \
136127
go build -trimpath -buildvcs=false -tags "with_utls" \
137-
-ldflags "-s -w -X 'github.com/iniwex5/vohive/internal/global.Version=${{ steps.vars.outputs.version }}' -X 'github.com/iniwex5/vohive/internal/global.BuildTime=${{ steps.vars.outputs.buildtime }}'" \
128+
-ldflags "-s -w -X 'github.com/boa-z/vohive/internal/global.Version=${{ steps.vars.outputs.version }}' -X 'github.com/boa-z/vohive/internal/global.BuildTime=${{ steps.vars.outputs.buildtime }}'" \
138129
-o dist/vo-hive ./cmd/vohive
139130
140131
- name: Install UPX
@@ -196,6 +187,9 @@ jobs:
196187
uses: softprops/action-gh-release@v2
197188
with:
198189
tag_name: ${{ steps.release_vars.outputs.release_version }}
190+
files: dist/*
191+
fail_on_unmatched_files: true
192+
overwrite_files: true
199193

200194
- name: Load source release metadata
201195
id: source_release
@@ -223,28 +217,6 @@ jobs:
223217
echo "EOF"
224218
} >> "${GITHUB_OUTPUT}"
225219
226-
- name: Validate token for cross-repo publish
227-
shell: bash
228-
env:
229-
GH_PAT: ${{ secrets.GH_PAT }}
230-
run: |
231-
if [[ -z "${GH_PAT}" ]]; then
232-
echo "GH_PAT is required to publish assets to iniwex5/vohive-release"
233-
exit 1
234-
fi
235-
236-
- name: Publish to vohive-release repository
237-
uses: softprops/action-gh-release@v2
238-
with:
239-
repository: iniwex5/vohive-release
240-
token: ${{ secrets.GH_PAT }}
241-
tag_name: ${{ steps.release_vars.outputs.release_version }}
242-
name: ${{ steps.source_release.outputs.release_name }}
243-
body: ${{ steps.source_release.outputs.release_body }}
244-
files: dist/*
245-
fail_on_unmatched_files: true
246-
overwrite_files: true
247-
248220
- name: Upload assets to Telegram channel
249221
if: ${{ env.TELEGRAM_BOT_TOKEN != '' && env.TELEGRAM_CHANNEL_ID != '' }}
250222
env:

.github/workflows/docker-build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,8 @@ jobs:
6767
sbom: false
6868
cache-from: type=gha
6969
cache-to: type=gha,mode=max
70-
secrets: |
71-
gh_pat=${{ secrets.GH_PAT }}
7270
build-args: |
7371
VERSION=${{ steps.vars.outputs.version }}
7472
BUILDTIME=${{ steps.vars.outputs.buildtime }}
7573
REVISION=${{ steps.vars.outputs.revision }}
7674
ENABLE_UPX=${{ steps.vars.outputs.enable_upx }}
77-
GH_PAT=${{ secrets.GH_PAT }}

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,8 @@ jobs:
8181
labels: ${{ steps.meta.outputs.labels }}
8282
cache-from: type=gha
8383
cache-to: type=gha,mode=max
84-
secrets: |
85-
gh_pat=${{ secrets.GH_PAT }}
8684
build-args: |
8785
VERSION=${{ steps.vars.outputs.version }}
8886
BUILDTIME=${{ steps.vars.outputs.buildtime }}
8987
REVISION=${{ steps.vars.outputs.revision }}
9088
ENABLE_UPX=${{ steps.vars.outputs.enable_upx }}
91-
GH_PAT=${{ secrets.GH_PAT }}

DOCKERHUB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ environment:
131131

132132
## 📖 文档
133133

134-
完整文档请访问: [GitHub](https://github.com/iniwex5/vohive)
134+
完整文档请访问: [GitHub](https://github.com/boa-z/vohive)
135135

136136
## 📝 License
137137

Dockerfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
# 构建阶段 1: 前端构建 (Frontend)
22
FROM node:20-alpine AS frontend-builder
33
WORKDIR /app/web
4-
COPY go-4gproxy/web/package*.json ./
4+
COPY web/package*.json ./
55
RUN npm ci
6-
COPY go-4gproxy/web/ .
6+
COPY web/ .
77
RUN npm run build
88

99
# 构建阶段 2: 后端构建 (Backend)
1010
FROM golang:1.24-alpine AS backend-builder
11-
ARG GH_PAT=""
1211
WORKDIR /app
1312

1413
# 启用 Go 工具链自动下载
1514
ENV GOTOOLCHAIN=auto
16-
ENV GOPRIVATE=github.com/iniwex5/*
17-
ENV GONOSUMDB=github.com/iniwex5/*
15+
ENV GOWORK=off
1816

1917
# 安装构建依赖
2018
RUN apk add --no-cache git
2119

22-
# 配置 Git 以支持拉取私有库
23-
RUN if [ -n "${GH_PAT}" ]; then git config --global url."https://x-access-token:${GH_PAT}@github.com/iniwex5/".insteadOf "https://github.com/iniwex5/"; fi
24-
2520
# 复制 go mod 文件
26-
COPY go-4gproxy/go.mod go-4gproxy/go.sum ./
27-
21+
COPY go.mod go.sum ./
2822
RUN go mod download
2923

3024
# 复制源代码 (不包含 internal/web/dist,这将在下一步从前端构建阶段复制)
31-
COPY go-4gproxy/ .
25+
COPY cmd ./cmd
26+
COPY internal ./internal
27+
COPY pkg ./pkg
28+
COPY engine ./engine
3229

3330
# 复制构建好的前端资源到 internal/web/dist 以便嵌入
3431
# 必须在 go build 之前完成
@@ -41,7 +38,7 @@ RUN ls -la internal/web/dist/ && echo "Frontend assets copied successfully"
4138
RUN go mod tidy
4239
RUN VERSION=$(git describe --tags --always --dirty || echo "unknown") && \
4340
BUILD_TIME=$(date "+%Y-%m-%d %H:%M:%S") && \
44-
CGO_ENABLED=0 GOOS=linux go build -trimpath -buildvcs=false -tags "with_utls nomsgpack" -ldflags "-s -w -X 'github.com/iniwex5/vohive/internal/global.Version=${VERSION}' -X 'github.com/iniwex5/vohive/internal/global.BuildTime=${BUILD_TIME}'" -o vo-hive ./cmd/vohive
41+
CGO_ENABLED=0 GOOS=linux go build -trimpath -buildvcs=false -tags "with_utls nomsgpack" -ldflags "-s -w -X 'github.com/boa-z/vohive/internal/global.Version=${VERSION}' -X 'github.com/boa-z/vohive/internal/global.BuildTime=${BUILD_TIME}'" -o /app/vo-hive ./cmd/vohive
4542

4643
# 运行阶段 (Runtime)
4744
FROM alpine:latest

Dockerfile.github

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ ARG VERSION=unknown
2020
ARG BUILDTIME=unknown
2121
ARG REVISION=unknown
2222
ARG ENABLE_UPX=1
23-
ARG GH_PAT=""
2423
WORKDIR /app
2524

2625
# 启用 Go 工具链自动下载
2726
ENV GOTOOLCHAIN=auto
2827
ENV GOWORK=off
29-
ENV GOPRIVATE=github.com/iniwex5/*
30-
ENV GONOSUMDB=github.com/iniwex5/*
3128

3229
# 安装构建依赖
3330
RUN apk add --no-cache git
@@ -39,19 +36,13 @@ COPY go.mod go.sum ./
3936
ARG TARGETOS
4037
ARG TARGETARCH
4138
RUN --mount=type=cache,target=/go/pkg/mod,id=gomod-${TARGETOS}-${TARGETARCH},sharing=locked \
42-
--mount=type=secret,id=gh_pat \
43-
GH_TOKEN="$(cat /run/secrets/gh_pat 2>/dev/null || true)" && \
44-
if [ -z "${GH_TOKEN}" ]; then GH_TOKEN="${GH_PAT}"; fi && \
45-
if [ -n "${GH_TOKEN}" ]; then \
46-
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/iniwex5/".insteadOf "https://github.com/iniwex5/"; \
47-
fi && \
48-
go mod download && \
49-
if [ -n "${GH_TOKEN}" ]; then \
50-
git config --global --unset-all url."https://x-access-token:${GH_TOKEN}@github.com/iniwex5/".insteadOf || true; \
51-
fi
39+
go mod download
5240

5341
# 复制源代码
54-
COPY . .
42+
COPY cmd ./cmd
43+
COPY internal ./internal
44+
COPY pkg ./pkg
45+
COPY engine ./engine
5546

5647
# 复制构建好的前端资源到 internal/web/dist 以便嵌入
5748
COPY --from=frontend-builder /app/web/dist ./internal/web/dist/
@@ -63,15 +54,9 @@ RUN ls -la internal/web/dist/ && echo "Frontend assets copied successfully"
6354
# 挂载 Go 构建缓存和模块缓存,加速重复构建
6455
RUN --mount=type=cache,target=/root/.cache/go-build,id=gobuild-${TARGETOS}-${TARGETARCH},sharing=locked \
6556
--mount=type=cache,target=/go/pkg/mod,id=gomod-${TARGETOS}-${TARGETARCH},sharing=locked \
66-
--mount=type=secret,id=gh_pat \
67-
GH_TOKEN="$(cat /run/secrets/gh_pat 2>/dev/null || true)" && \
68-
if [ -z "${GH_TOKEN}" ]; then GH_TOKEN="${GH_PAT}"; fi && \
69-
if [ -n "${GH_TOKEN}" ]; then \
70-
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/iniwex5/".insteadOf "https://github.com/iniwex5/"; \
71-
fi && \
7257
go mod tidy && \
7358
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
74-
go build -trimpath -buildvcs=false -tags "with_utls nomsgpack" -ldflags "-s -w -X 'github.com/iniwex5/vohive/internal/global.Version=${VERSION}' -X 'github.com/iniwex5/vohive/internal/global.BuildTime=${BUILDTIME}'" -o vo-hive ./cmd/vohive && \
59+
go build -trimpath -buildvcs=false -tags "with_utls nomsgpack" -ldflags "-s -w -X 'github.com/boa-z/vohive/internal/global.Version=${VERSION}' -X 'github.com/boa-z/vohive/internal/global.BuildTime=${BUILDTIME}'" -o vo-hive ./cmd/vohive && \
7560
if [ "${ENABLE_UPX}" = "1" ] || [ "${ENABLE_UPX}" = "true" ]; then \
7661
echo "UPX enabled, compressing binary..."; \
7762
(apk add --no-cache upx >/dev/null 2>&1 || apk add --no-cache upx-ucl >/dev/null 2>&1 || true); \
@@ -83,9 +68,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build,id=gobuild-${TARGETOS}-${TAR
8368
else \
8469
echo "UPX disabled."; \
8570
fi && \
86-
if [ -n "${GH_TOKEN}" ]; then \
87-
git config --global --unset-all url."https://x-access-token:${GH_TOKEN}@github.com/iniwex5/".insteadOf || true; \
88-
fi && \
8971
ls -lh /app/vo-hive
9072

9173
# 运行阶段 (Runtime)

MODULE_VENDOR_ABSTRACTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Quectel USBNET mode values.
4949

5050
## Next Boundary
5151

52-
The QMI control implementation still imports `github.com/iniwex5/quectel-qmi-go`.
52+
The QMI control implementation still imports `github.com/boa-z/quectel-qmi-go`.
5353
Before adding more modem families, wrap that dependency behind a local package
5454
whose public names are vendor-neutral, then move Quectel-specific assumptions
5555
into adapter code. The current `backend.DeviceBackend` and modem `ATDialect`

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BUILD_TIME ?= $(shell date "+%Y-%m-%d %H:%M:%S")
88
DIST_DIR ?= dist
99
MAIN_PACKAGE ?= ./cmd/vohive
1010

11-
LDFLAGS = -s -w -X 'github.com/iniwex5/vohive/internal/global.Version=$(VERSION)' -X 'github.com/iniwex5/vohive/internal/global.BuildTime=$(BUILD_TIME)'
11+
LDFLAGS = -s -w -X 'github.com/boa-z/vohive/internal/global.Version=$(VERSION)' -X 'github.com/boa-z/vohive/internal/global.BuildTime=$(BUILD_TIME)'
1212
GO_BUILD = go build -trimpath -buildvcs=false -tags "$(GO_TAGS)" -ldflags "$(LDFLAGS)"
1313

1414
AMD64_OUT = $(DIST_DIR)/$(BINARY_NAME)_$(VERSION_TAG)_linux_amd64

cmd/mbimprobe/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ package main
44
import (
55
"context"
66
"crypto/rand"
7+
"encoding/hex"
78
"fmt"
89
"os"
910
"time"
10-
"encoding/hex"
1111

12-
dev "github.com/iniwex5/vohive/internal/device"
13-
mbimcore "github.com/iniwex5/vohive/internal/mbim"
12+
dev "github.com/boa-z/vohive/internal/device"
13+
mbimcore "github.com/boa-z/vohive/internal/mbim"
1414
)
1515

1616
func main() {

cmd/vohive/main.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ import (
1414
"syscall"
1515
"time"
1616

17+
"github.com/boa-z/vohive/internal/api"
18+
"github.com/boa-z/vohive/internal/config"
19+
"github.com/boa-z/vohive/internal/db"
20+
"github.com/boa-z/vohive/internal/device"
21+
"github.com/boa-z/vohive/internal/notify"
22+
proxyserver "github.com/boa-z/vohive/internal/proxy/server"
23+
"github.com/boa-z/vohive/internal/proxy/traffic"
24+
"github.com/boa-z/vohive/internal/sipgw"
25+
"github.com/boa-z/vohive/internal/upstreamproxy"
1726
"github.com/boa-z/vowifi-go/runtimehost/carrier"
1827
"github.com/boa-z/vowifi-go/runtimehost/voicehost"
19-
"github.com/iniwex5/vohive/internal/api"
20-
"github.com/iniwex5/vohive/internal/config"
21-
"github.com/iniwex5/vohive/internal/db"
22-
"github.com/iniwex5/vohive/internal/device"
23-
"github.com/iniwex5/vohive/internal/notify"
24-
proxyserver "github.com/iniwex5/vohive/internal/proxy/server"
25-
"github.com/iniwex5/vohive/internal/proxy/traffic"
26-
"github.com/iniwex5/vohive/internal/sipgw"
27-
"github.com/iniwex5/vohive/internal/upstreamproxy"
28-
29-
"github.com/iniwex5/vohive/internal/web"
30-
"github.com/iniwex5/vohive/pkg/logger"
28+
29+
"github.com/boa-z/vohive/internal/web"
30+
"github.com/boa-z/vohive/pkg/logger"
3131

3232
"github.com/emiago/sipgo/sip"
3333
)

0 commit comments

Comments
 (0)