Files
helloworld/.drone.yml
C菌 8ff3944b20
Some checks failed
continuous-integration/drone/push Build was killed
up
2022-04-13 04:56:47 +08:00

87 lines
1.5 KiB
YAML

---
kind: pipeline
name: default
platform:
os: linux
arch: arm64
steps:
- name: build
pull: if-not-exists #always
image: golang:alpine
commands:
- "pwd && ls"
- "make docker"
- name: build docker image
image: plugins/docker
pull: if-not-exists
settings:
auto_tag: true
insecure: true
dockerfile: Dockerfile
repo: mirrors2/helloworld
username:
from_secret: docker_username
password:
from_secret: docker_password
commands:
- "ls"
- 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
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: pipeline
name: build amd64
platform:
os: linux
arch: amd64
steps:
- name: build
pull: if-not-exists #always
image: golang:alpine
commands:
- "pwd && ls"
- "make docker"
- name: build docker image
image: plugins/docker
pull: if-not-exists
settings:
auto_tag: true
insecure: true
dockerfile: Dockerfile
repo: mirrors2/helloworld
username:
from_secret: docker_username
password:
from_secret: docker_password
commands:
- "ls"