Files
docker-compose-updater/.gitea/workflows/build.yaml
T
ilovintit cea9b941cf
Build and Push / build (push) Failing after 13m20s
Initial commit: docker-compose-updater
Go 项目,包含:
- 服务端 updater:两阶段协议,ECDSA 签名验证,AES-GCM 加密
- 发送端 dcu-send:Gitea Action CLI
- internal/auth:加解密/签名/会话管理
- internal/docker:Docker CLI 容器查找/拉取/重建
- action/:Gitea Action 定义
- deploy/Dockerfile:多阶段构建
- .gitea/workflows/build.yaml:CI/CD
2026-06-08 15:16:46 +08:00

29 lines
881 B
YAML

name: Build and Push
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build updater binary (test only)
run: |
go mod download
go build -o /dev/null ./cmd/updater
go build -o /dev/null ./cmd/dcu-send
- name: Log in to registry
run: docker login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASS }} ${{ secrets.REGISTRY_URL }}
- name: Build and push updater image
run: |
PUBLIC_KEY_BASE64=$(base64 -w0 < keys/signing-public.pem)
docker build \
--build-arg PUBLIC_KEY_BASE64=$PUBLIC_KEY_BASE64 \
-t ${{ secrets.REGISTRY_URL }}/docker-compose-updater:latest \
-f deploy/Dockerfile .
docker push ${{ secrets.REGISTRY_URL }}/docker-compose-updater:latest