kind: pipeline type: docker name: default trigger: branch: - main platform: os: linux arch: amd64 steps: # Run go tests - name: go-test image: golang volumes: - name: deps path: /go commands: - cd src - go test # Build go binaries - name: go-build-bin-amd64 image: golang volumes: - name: deps path: /go - name: bin path: /binaries commands: - cd src - go build -o /binaries/app depends_on: - go-test # Build Containers for each architecture - name: docker-build-image-amd64 image: plugins/docker # Check Entrypoint volumes: - name: docker_socket path: /var/run/docker.sock - name: bin path: /binaries privileged: true commands: - sleep 300 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 nocache: true depends_on: - "go-build-bin-amd64" # Run go tests - name: binary-cleanup image: alpine:latest volumes: - name: bin path: /binaries commands: - rm -rf /binaries/* when: status: - failure - success depends_on: - "go-build-bin-amd64" - docker-build-image-amd64 # Volumes to mount between steps volumes: - name: deps temp: {} - name: bin temp: {} - name: docker_socket host: path: /var/run/docker.sock