diff --git a/.drone.yml b/.drone.yml index 238a689..7f5be2a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,7 +28,21 @@ steps: event: - push - tag - +- name: dind + pull: if-not-exists #always + image: docker:dind + volumes: + - name: dockersock + path: /var/run/docker.sock + commands: + - make docker + - docker buildx build --platform linux/amd64,linux/arm64 -t mirrors2/helloworld:latest . --push + privileged: true + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password - name: buildx pull: if-not-exists #always image: thegeeklab/drone-docker-buildx @@ -59,58 +73,8 @@ trigger: event: - pull_request - push +volumes: +- name: dockersock + host: + path: /var/run/docker.sock ---- -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