Use multi-pipeline for CI
This commit is contained in:
		
							
								
								
									
										26
									
								
								.woodpecker/push.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								.woodpecker/push.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| pipeline: | ||||
|   tag: | ||||
|     image: alpine:latest | ||||
|     commands: | ||||
|       - cat ezshare/version.go |grep Vers|cut -d "=" -f2 | tr -d " v\""|xargs echo "latest,"|tr -d " " > .tags | ||||
|       - cat .tags | ||||
|     when: | ||||
|       status: [success] | ||||
|       branch: refs/tags/* | ||||
|       tag: v* | ||||
|  | ||||
|   publish: | ||||
|     image: plugins/docker | ||||
|     settings: | ||||
|       repo: registry.t-juice.club/ezshare | ||||
|       username: woodpecker | ||||
|       password:  | ||||
|         from_secret: registrypass | ||||
|     when: | ||||
|       branch: refs/tags/* | ||||
|       tag: v* | ||||
|  | ||||
| depends_on: | ||||
|   - "test" | ||||
|  | ||||
| run_on: [success] | ||||
							
								
								
									
										15
									
								
								.woodpecker/test.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								.woodpecker/test.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| pipeline: | ||||
|   test: | ||||
|     image: golang:${GO_VERSION} | ||||
|     commands: | ||||
|       - go build main.go | ||||
|       - go test -v ./... | ||||
|       - go vet ./... | ||||
|     when: | ||||
|       branch: master | ||||
|       event: [push, pull_request, tag, deployment] | ||||
|  | ||||
| matrix: | ||||
|   GO_VERSION: | ||||
|     - "1.17" | ||||
|     - "latest" | ||||
		Reference in New Issue
	
	Block a user