3 Star 19 Fork 8

hackchen/gdshop-admin-go-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.drone.yml 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
公用 提交于 2021-07-30 18:37 +08:00 . [代码完善](dev-shop): 自动发布
kind: pipeline
type: docker
name: default
steps:
- name: 编译
image: golang:1.16.5-alpine
pull: if-not-exists
volumes:
- name: cache_golang_mod
path: /go/pkg/mod
environment:
GOPROXY: https://goproxy.io,direct
commands:
- CGO_ENABLED=0 GOOS=linux go build -mod=mod -a -installsuffix cgo -o main .
- name: 构建镜像
image: plugins/docker
pull: if-not-exists
settings:
mirror: https://onmbochl.mirror.aliyuncs.com # 我自己的加速地址
purge: false
username:
from_secret: docker_user # 在 drone 的 secret 里面设置的变量
password:
from_secret: docker_pass # 在 drone 的 secret 里面设置的变量
registry: registry.cn-shenzhen.aliyuncs.com
repo: registry.cn-shenzhen.aliyuncs.com/auto_publish/gdshop-admin-go-api
#tags: ${DRONE_TAG=latest}
#auto_tag: true
insecure: true
# debug: true
# use_cache: true
tags:
- 'test-latest'
- name: 触发部署
image: plugins/webhook
settings:
urls:
from_secret: webhook_url
debug: true
when: # 本步骤执行条件
branch: # 根据分支 为 test的才执行
- test
trigger:
branch:
- test
volumes:
- name: cache_golang_mod
host:
path: /tmp/cache/golang-mod # 必须先建好目录
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hackchen/gdshop-admin-go-api.git
git@gitee.com:hackchen/gdshop-admin-go-api.git
hackchen
gdshop-admin-go-api
gdshop-admin-go-api
master

搜索帮助