Add compile sh

Signed-off-by: ChenKaiLiuG <ckliu119@gmail.com>
This commit is contained in:
2026-01-01 15:29:30 +00:00
parent d7d0c8fbfe
commit 2f23ebc98f

36
.drone.yml Normal file
View File

@@ -0,0 +1,36 @@
kind: pipeline
type: docker
name: build-goedge
trigger:
branch:
- master
event:
- push
- tag
steps:
# 第一步:編譯 EdgeAdmin
- name: build-admin
image: docker:dind
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- docker build -f docker/Dockerfile -t localhost:5700/goedge-admin:${DRONE_COMMIT_SHA:0:7} .
- docker tag localhost:5700/goedge-admin:${DRONE_COMMIT_SHA:0:7} localhost:5700/goedge-admin:latest
# 第二步:推送到你的 Registry
- name: push-admin
image: docker:dind
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- docker push localhost:5700/goedge-admin:${DRONE_COMMIT_SHA:0:7}
- docker push localhost:5700/goedge-admin:latest
volumes:
- name: docker
host:
path: /var/run/docker.sock