mirror of
				https://github.com/KevinMidboe/cloudflare-ddns.git
				synced 2025-10-29 17:40:17 +00:00 
			
		
		
		
	Drone CI configuration file
This commit is contained in:
		
							
								
								
									
										65
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | ||||
| --- | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: Build | ||||
|  | ||||
| platform: | ||||
|   os: linux | ||||
|   arch: amd64 | ||||
|  | ||||
| steps: | ||||
|   - name: Publish to ghcr | ||||
|     image: plugins/docker | ||||
|     settings: | ||||
|       registry: ghcr.io | ||||
|       repo: ghcr.io/kevinmidboe/cloudflare-ddns | ||||
|       dockerfile: Dockerfile | ||||
|       username: | ||||
|         from_secret: GITHUB_USERNAME | ||||
|       password: | ||||
|         from_secret: GITHUB_PASSWORD | ||||
|       tags: | ||||
|         - latest | ||||
|         - ${DRONE_COMMIT_SHA} | ||||
|     when: | ||||
|       event: | ||||
|         include: | ||||
|           - push | ||||
|         exclude: | ||||
|           - pull_request | ||||
|       branch: | ||||
|         - main | ||||
|  | ||||
| --- | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: Deploy | ||||
|  | ||||
| platform: | ||||
|   os: linux | ||||
|   arch: amd64 | ||||
|  | ||||
| steps: | ||||
|   - name: Deploy to kubernetes | ||||
|     image: alpine/k8s:1.25.15 | ||||
|     commands: | ||||
|       - mkdir -p /root/.kube | ||||
|       - echo $KUBE_CONFIG | base64 -di > /root/.kube/config | ||||
|       - export IMAGE=ghcr.io/kevinmidboe/cloudflare-ddns:${DRONE_COMMIT_SHA} | ||||
|       - cat .kubernetes/*.yml | ||||
|         | envsubst | ||||
|         | kubectl --kubeconfig=/root/.kube/config apply -f - | ||||
|     environment: | ||||
|       KUBE_CONFIG: | ||||
|         from_secret: KUBE_CONFIG | ||||
|     when: | ||||
|       event: | ||||
|         include: | ||||
|           - push | ||||
|         exclude: | ||||
|           - pull_request | ||||
|       branch: | ||||
|         - main | ||||
|  | ||||
| depends_on: | ||||
|   - Build | ||||
		Reference in New Issue
	
	Block a user