From 6e3a085ce757864788a189bbc6c3af099b98b456 Mon Sep 17 00:00:00 2001 From: Janic Voser Date: Fri, 10 Mar 2023 23:37:17 +0100 Subject: [PATCH] Check advanced pipeline --- .drone.yml | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index fc45dc5..a3a32ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,8 +6,13 @@ trigger: branch: - main +platform: + os: linux + arch: amd64 + steps: -- name: Go Tests +# Run go tests +- name: go-test image: golang volumes: - name: deps @@ -16,7 +21,8 @@ steps: - cd src - go test -- name: build +# Build go binaries +- name: go-build-bin-amd64 image: golang volumes: - name: deps @@ -26,6 +32,34 @@ steps: commands: - cd src - go build -o /binaries/app + depends_on: + - go-test + +# Build Containers for each architecture +- name: docker-build-image-amd64 + image: thegeeklab/drone-docker-buildx + volumes: + - name: docker_socket + path: /var/run/docker.sock + - name: bin + path: /binaries + privileged: true + settings: + username: + from_secret: gitea_username + password: + from_secret: gitea_password + repo: gitea.voser.cloud/container/iwilldie + registry: https://gitea.voser.cloud + tags: + - ${DRONE_COMMIT_BRANCH} + - latest + platforms: linux/amd64 + dockerfile: ./Docker/Dockerfile + depends_on: + - "go-build-bin-amd64" + +# Volumes to mount between steps volumes: - name: deps temp: {}