This commit is contained in:
		
							
								
								
									
										38
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								.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: {}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user