This commit is contained in:
66
.drone.yml
66
.drone.yml
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
@@ -7,7 +8,7 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
pull: if-not-exists #always
|
pull: if-not-exists #always
|
||||||
image: golang:alpine
|
image: golang
|
||||||
commands:
|
commands:
|
||||||
- "pwd && ls"
|
- "pwd && ls"
|
||||||
- name: build docker image
|
- name: build docker image
|
||||||
@@ -21,9 +22,12 @@ steps:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
repo: mirrors2/helloworld
|
repo: mirrors2/helloworld
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
insecure: true
|
# auto_tag_suffix: linux-arm64
|
||||||
commands:
|
# insecure: true
|
||||||
- "ls"
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
- name: buildx
|
- name: buildx
|
||||||
pull: if-not-exists #always
|
pull: if-not-exists #always
|
||||||
@@ -56,3 +60,57 @@ trigger:
|
|||||||
- pull_request
|
- pull_request
|
||||||
- push
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: linux-amd64
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
pull: if-not-exists #always
|
||||||
|
image: golang
|
||||||
|
commands:
|
||||||
|
- "pwd && ls"
|
||||||
|
- name: build docker image
|
||||||
|
image: plugins/docker
|
||||||
|
pull: if-not-exists
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
repo: mirrors2/helloworld
|
||||||
|
auto_tag: true
|
||||||
|
# auto_tag_suffix: linux-amd64
|
||||||
|
# insecure: true
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: buildx
|
||||||
|
pull: if-not-exists #always
|
||||||
|
image: thegeeklab/drone-docker-buildx
|
||||||
|
privileged: true
|
||||||
|
settings:
|
||||||
|
# registry:
|
||||||
|
repo: mirrors2/helloworld
|
||||||
|
purge: true
|
||||||
|
compress: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
# context:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
tags: latest
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- alpine/*
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|||||||
Reference in New Issue
Block a user