mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	* drone/docker: prepare multi-arch release * Add docker-linux-arm64 pipeline * add arm 64 build to manifest * tag dry-run + indent * Fix notify dependency
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							6b84a1d72b
						
					
				
				
					commit
					14c979c1b2
				
			
							
								
								
									
										99
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										99
									
								
								.drone.yml
									
									
									
									
									
								
							@@ -558,7 +558,7 @@ steps:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
kind: pipeline
 | 
					kind: pipeline
 | 
				
			||||||
name: docker
 | 
					name: docker-linux-amd64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
platform:
 | 
					platform:
 | 
				
			||||||
  os: linux
 | 
					  os: linux
 | 
				
			||||||
@@ -594,6 +594,7 @@ steps:
 | 
				
			|||||||
    settings:
 | 
					    settings:
 | 
				
			||||||
      dry_run: true
 | 
					      dry_run: true
 | 
				
			||||||
      repo: gitea/gitea
 | 
					      repo: gitea/gitea
 | 
				
			||||||
 | 
					      tags: linux-amd64
 | 
				
			||||||
    when:
 | 
					    when:
 | 
				
			||||||
      event:
 | 
					      event:
 | 
				
			||||||
        - pull_request
 | 
					        - pull_request
 | 
				
			||||||
@@ -603,6 +604,7 @@ steps:
 | 
				
			|||||||
    image: plugins/docker:linux-amd64
 | 
					    image: plugins/docker:linux-amd64
 | 
				
			||||||
    settings:
 | 
					    settings:
 | 
				
			||||||
      auto_tag: true
 | 
					      auto_tag: true
 | 
				
			||||||
 | 
					      auto_tag_suffix: linux-amd64
 | 
				
			||||||
      repo: gitea/gitea
 | 
					      repo: gitea/gitea
 | 
				
			||||||
      password:
 | 
					      password:
 | 
				
			||||||
        from_secret: docker_password
 | 
					        from_secret: docker_password
 | 
				
			||||||
@@ -613,6 +615,97 @@ steps:
 | 
				
			|||||||
        exclude:
 | 
					        exclude:
 | 
				
			||||||
        - pull_request
 | 
					        - pull_request
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					kind: pipeline
 | 
				
			||||||
 | 
					name: docker-linux-arm64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					platform:
 | 
				
			||||||
 | 
					  os: linux
 | 
				
			||||||
 | 
					  arch: arm64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					workspace:
 | 
				
			||||||
 | 
					  base: /go
 | 
				
			||||||
 | 
					  path: src/code.gitea.io/gitea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					depends_on:
 | 
				
			||||||
 | 
					  - testing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					trigger:
 | 
				
			||||||
 | 
					  ref:
 | 
				
			||||||
 | 
					  - refs/heads/master
 | 
				
			||||||
 | 
					  - "refs/tags/**"
 | 
				
			||||||
 | 
					  - "refs/pull/**"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					steps:
 | 
				
			||||||
 | 
					  - name: fetch-tags
 | 
				
			||||||
 | 
					    pull: default
 | 
				
			||||||
 | 
					    image: docker:git
 | 
				
			||||||
 | 
					    commands:
 | 
				
			||||||
 | 
					      - git fetch --tags --force
 | 
				
			||||||
 | 
					    when:
 | 
				
			||||||
 | 
					      event:
 | 
				
			||||||
 | 
					        exclude:
 | 
				
			||||||
 | 
					          - pull_request
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  - name: dryrun
 | 
				
			||||||
 | 
					    pull: always
 | 
				
			||||||
 | 
					    image: plugins/docker:linux-arm64
 | 
				
			||||||
 | 
					    settings:
 | 
				
			||||||
 | 
					      dry_run: true
 | 
				
			||||||
 | 
					      repo: gitea/gitea
 | 
				
			||||||
 | 
					      tags: linux-arm64
 | 
				
			||||||
 | 
					    when:
 | 
				
			||||||
 | 
					      event:
 | 
				
			||||||
 | 
					        - pull_request
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  - name: publish
 | 
				
			||||||
 | 
					    pull: always
 | 
				
			||||||
 | 
					    image: plugins/docker:linux-arm64
 | 
				
			||||||
 | 
					    settings:
 | 
				
			||||||
 | 
					      auto_tag: true
 | 
				
			||||||
 | 
					      auto_tag_suffix: linux-arm64
 | 
				
			||||||
 | 
					      repo: gitea/gitea
 | 
				
			||||||
 | 
					      password:
 | 
				
			||||||
 | 
					        from_secret: docker_password
 | 
				
			||||||
 | 
					      username:
 | 
				
			||||||
 | 
					        from_secret: docker_username
 | 
				
			||||||
 | 
					    when:
 | 
				
			||||||
 | 
					      event:
 | 
				
			||||||
 | 
					        exclude:
 | 
				
			||||||
 | 
					        - pull_request
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					kind: pipeline
 | 
				
			||||||
 | 
					name: docker-manifest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					platform:
 | 
				
			||||||
 | 
					  os: linux
 | 
				
			||||||
 | 
					  arch: amd64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					steps:
 | 
				
			||||||
 | 
					  - name: manifest
 | 
				
			||||||
 | 
					    pull: always
 | 
				
			||||||
 | 
					    image: plugins/manifest
 | 
				
			||||||
 | 
					    settings:
 | 
				
			||||||
 | 
					      auto_tag: true
 | 
				
			||||||
 | 
					      ignore_missing: true
 | 
				
			||||||
 | 
					      spec: docker/manifest.tmpl
 | 
				
			||||||
 | 
					      password:
 | 
				
			||||||
 | 
					        from_secret: docker_password
 | 
				
			||||||
 | 
					      username:
 | 
				
			||||||
 | 
					        from_secret: docker_username
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					trigger:
 | 
				
			||||||
 | 
					  ref:
 | 
				
			||||||
 | 
					  - refs/heads/master
 | 
				
			||||||
 | 
					  - "refs/tags/**"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					depends_on:
 | 
				
			||||||
 | 
					  - docker-linux-amd64
 | 
				
			||||||
 | 
					  - docker-linux-arm64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
kind: pipeline
 | 
					kind: pipeline
 | 
				
			||||||
name: notify
 | 
					name: notify
 | 
				
			||||||
@@ -635,7 +728,9 @@ depends_on:
 | 
				
			|||||||
  - translations
 | 
					  - translations
 | 
				
			||||||
  - release-version
 | 
					  - release-version
 | 
				
			||||||
  - release-master
 | 
					  - release-master
 | 
				
			||||||
  - docker
 | 
					  - docker-linux-amd64
 | 
				
			||||||
 | 
					  - docker-linux-arm64
 | 
				
			||||||
 | 
					  - docker-manifest
 | 
				
			||||||
  - docs
 | 
					  - docs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
steps:
 | 
					steps:
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										19
									
								
								docker/manifest.tmpl
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								docker/manifest.tmpl
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
 | 
				
			||||||
 | 
					{{#if build.tags}}
 | 
				
			||||||
 | 
					tags:
 | 
				
			||||||
 | 
					{{#each build.tags}}
 | 
				
			||||||
 | 
					  - {{this}}
 | 
				
			||||||
 | 
					{{/each}}
 | 
				
			||||||
 | 
					{{/if}}
 | 
				
			||||||
 | 
					manifests:
 | 
				
			||||||
 | 
					  -
 | 
				
			||||||
 | 
					    image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
 | 
				
			||||||
 | 
					    platform:
 | 
				
			||||||
 | 
					      architecture: amd64
 | 
				
			||||||
 | 
					      os: linux
 | 
				
			||||||
 | 
					  -
 | 
				
			||||||
 | 
					    image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
 | 
				
			||||||
 | 
					    platform:
 | 
				
			||||||
 | 
					      architecture: arm64
 | 
				
			||||||
 | 
					      os: linux
 | 
				
			||||||
 | 
					      variant: v8
 | 
				
			||||||
		Reference in New Issue
	
	Block a user