cea9b941cf
Build and Push / build (push) Failing after 13m20s
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
35 lines
736 B
Makefile
35 lines
736 B
Makefile
# docker-compose-updater Makefile
|
|
|
|
PUBLIC_KEY_BASE64 := $(shell base64 -w0 < keys/signing-public.pem)
|
|
|
|
.PHONY: all build-updater build-send tidy clean
|
|
|
|
all: build-updater build-send
|
|
|
|
# 构建 updater(服务端)
|
|
build-updater:
|
|
go build -ldflags="-X main.publicKeyBase64=$(PUBLIC_KEY_BASE64)" \
|
|
-o updater ./cmd/updater
|
|
|
|
# 构建 dcu-send(发送端)
|
|
build-send:
|
|
go build -o dcu-send ./cmd/dcu-send
|
|
|
|
# 构建 Docker 镜像
|
|
docker-updater:
|
|
docker build \
|
|
--build-arg PUBLIC_KEY_BASE64=$(PUBLIC_KEY_BASE64) \
|
|
-t docker-compose-updater:latest \
|
|
-f deploy/Dockerfile .
|
|
|
|
docker-action:
|
|
docker build -t dcu-send:latest -f action/Dockerfile .
|
|
|
|
# Go mod 管理
|
|
tidy:
|
|
go mod tidy
|
|
go mod verify
|
|
|
|
clean:
|
|
rm -f updater dcu-send
|