Files
pangolin/.gitea/workflows/deploy-server.yml
T
wangjia 3efd67297e ci(server): 编译/测试直接在 runner 跑,去嵌套 docker(修 DinD;go 工具链自动下载)
compile-backend/test.sh 原在 golang:1.25 容器里跑,job 容器内 $PWD 在宿主不存在
→ DinD 挂载失败。改直接跑;go.mod 要求 1.25.10,靠 Go 工具链经 goproxy.cn 自动拉取。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 14:40:09 +08:00

40 lines
1.1 KiB
YAML

name: Deploy Server
on:
push:
tags:
- 'server-v[0-9]*.[0-9]*.[0-9]*'
workflow_dispatch:
concurrency:
group: deploy-server
cancel-in-progress: false
jobs:
deploy-server:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# 直接在 runner 跑(不嵌套 docker,避免 DinD 挂载失败)。runner 镜像的 go
# 若旧于 go.mod 要求(1.25.10),Go 工具链会经 GOPROXY=goproxy.cn 自动下载对应版本。
- name: Compile (Go 控制面)
run: bash scripts/ci/compile-backend.sh
- name: Test (go test)
run: bash scripts/ci/test.sh server
- name: Release → Forgejo
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
FORGEJO_URL: ${{ secrets.FORGEJO_URL }}
TAG: ${{ gitea.ref_name }}
run: bash scripts/ci/release-server.sh "$TAG"
- name: Deploy → pangolin1
env:
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
TAG: ${{ gitea.ref_name }}
run: bash scripts/ci/deploy-server.sh "$TAG"