71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
labels:
|
||
ci: domain-linux-native
|
||
platform: linux/amd64
|
||
|
||
clone:
|
||
- name: git
|
||
image: plugin-git
|
||
settings:
|
||
lfs: false
|
||
|
||
when:
|
||
- event: tag
|
||
ref: refs/tags/v*
|
||
|
||
concurrency: 1
|
||
|
||
steps:
|
||
# 前端只构建一次:两个架构的 Backend 构建并行跑在同一个工作目录里,各自 npm ci 会互相删 node_modules(ENOTEMPTY),
|
||
# 一个失败还会把另一个的构建进程一起杀掉。Backend 把 web/*/dist 内嵌进程序(展示端和管理端由面板自己提供)。
|
||
- name: web-build
|
||
image: bash
|
||
environment:
|
||
NPM_CONFIG_CACHE: /home/justme/.npm
|
||
commands:
|
||
- npm ci --prefix web --prefer-offline
|
||
- npm run build --prefix web
|
||
depends_on: []
|
||
|
||
- name: linux-amd64-backend
|
||
image: bash
|
||
environment:
|
||
NUGET_PACKAGES: /home/justme/.nuget/packages
|
||
ZOT_REGISTRY: registry.oeo.one
|
||
ZOT_USERNAME: justme
|
||
ZOT_SECRET:
|
||
from_secret: zot_secret
|
||
commands:
|
||
- bash ci/release-linux.sh amd64 backend
|
||
depends_on:
|
||
- web-build
|
||
|
||
- name: linux-arm64-backend
|
||
image: bash
|
||
environment:
|
||
NUGET_PACKAGES: /home/justme/.nuget/packages
|
||
ZOT_REGISTRY: registry.oeo.one
|
||
ZOT_USERNAME: justme
|
||
ZOT_SECRET:
|
||
from_secret: zot_secret
|
||
commands:
|
||
- bash ci/release-linux.sh arm64 backend
|
||
depends_on:
|
||
- web-build
|
||
|
||
- name: backend-multiarch-index
|
||
image: bash
|
||
environment:
|
||
ZOT_REGISTRY: registry.oeo.one
|
||
ZOT_SCHEME: https
|
||
ZOT_USERNAME: justme
|
||
ZOT_SECRET:
|
||
from_secret: zot_secret
|
||
RELEASE_API_URL: https://mo.oeo.one
|
||
RELEASE_SIGNING_KEY:
|
||
from_secret: release_signing_key
|
||
commands:
|
||
- bash ci/index-backend-image.sh
|
||
depends_on:
|
||
- linux-amd64-backend
|
||
- linux-arm64-backend
|