38 lines
702 B
YAML
38 lines
702 B
YAML
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: Build Dockerfile
|
||
|
|
||
|
# 手动触发或接口触发
|
||
|
trigger:
|
||
|
event:
|
||
|
- custom
|
||
|
|
||
|
# 指定运行环境节点,需在 runner 配置环境变量中指定 DRONE_RUNNER_LABELS
|
||
|
# node:
|
||
|
# 标签:值
|
||
|
|
||
|
# 使用插件构建镜像
|
||
|
steps:
|
||
|
- name: latest
|
||
|
image: thegeeklab/drone-docker-buildx
|
||
|
privileged: true
|
||
|
settings:
|
||
|
registry:
|
||
|
from_secret: REGISTRY
|
||
|
username:
|
||
|
from_secret: DOCKER_USERNAME
|
||
|
password:
|
||
|
from_secret: DOCKER_PASSWORD
|
||
|
repo:
|
||
|
from_secret: REPO
|
||
|
purge: true
|
||
|
compress: true
|
||
|
platforms:
|
||
|
- linux/amd64
|
||
|
- linux/arm64
|
||
|
context: ./
|
||
|
dockerfile: ./Dockerfile
|
||
|
tags: latest
|
||
|
when:
|
||
|
branch:
|
||
|
- main
|