chore: 更新 api-dev.yaml 以硬编码应用密钥,并优化部署工作流,增加 Go 模块缓存并启用 Docker 构建缓存。
Some checks failed
Build docker and publish / prepare (20.15.1) (push) Successful in 10s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:ppanel-admin name:admin]) (push) Successful in 8m45s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:ppanel-api name:api]) (push) Successful in 10m59s
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.rpc-core image_name:ppanel-rpc-core name:rpc-core]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:ppanel-node name:node]) (push) Has been cancelled

This commit is contained in:
shanshanzhong 2026-03-01 19:44:36 -08:00
parent 3b4429bdd9
commit d3da56891b
2 changed files with 16 additions and 9 deletions

View File

@ -205,7 +205,16 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: '1.24.0' # 确保使用 go.mod 中指定的精确版本
# cache: true # 可以启用缓存加速依赖下载
- name: 🗄️ 缓存 Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: 🔧 确保 Docker CLI 可用并初始化 Go Modules
run: |
@ -227,10 +236,8 @@ jobs:
echo "Docker CLI 版本: $(docker --version)"
echo "Test Docker connectivity: $(docker info --format '{{.ServerVersion}}') (Server)"
# 移除手动 Go 安装,已由 actions/setup-go 处理
# go version # 已经通过 actions/setup-go 设置
go env -w GOPROXY=https://goproxy.cn,direct # 设置 Go Proxy
go mod download # 确保所有模块已下载
go mod download # 确保所有模块已下载(缓存命中时自动跳过)
- name: 📦 构建并推送 Docker 镜像
run: |
@ -243,7 +250,7 @@ jobs:
FULL_IMAGE_NAME="${REPO}/${IMAGE_NAME}:${DEPLOY_TAG}"
echo "🚀 开始构建镜像: ${FULL_IMAGE_NAME} 从 ${DOCKERFILE}"
docker build --no-cache -t "${FULL_IMAGE_NAME}" -f "${DOCKERFILE}" .
docker build -t "${FULL_IMAGE_NAME}" -f "${DOCKERFILE}" .
echo "⬆️ 推送镜像: ${FULL_IMAGE_NAME}"
docker push "${FULL_IMAGE_NAME}"

View File

@ -37,10 +37,10 @@ CacheRedis:
AppSignature:
AppSecrets:
android-client: "{{ env "APP_SECRET_ANDROID_CLIENT" "uB4G,XxL2{7b" }}"
web-client: "{{ env "APP_SECRET_WEB_CLIENT" "uB4G,XxL2{7b" }}"
ios-client: "{{ env "APP_SECRET_IOS_CLIENT" "uB4G,XxL2{7b" }}"
mac-client: "{{ env "APP_SECRET_MAC_CLIENT" "uB4G,XxL2{7b" }}"
android-client: "uB4G,XxL2{7b}"
web-client: "uB4G,XxL2{7b}"
ios-client: "uB4G,XxL2{7b}"
mac-client: "uB4G,XxL2{7b}"
ValidWindowSeconds: 300
SkipPrefixes:
- /api/v1/health