mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Add Alpine package registry (#23714)
This PR adds an Alpine package registry. You can follow [this tutorial](https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package) to build a *.apk package for testing. This functionality is similar to the Debian registry (#22854) and therefore shares some methods. I marked this PR as blocked because it should be merged after #22854.  --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		| @@ -15,6 +15,7 @@ import ( | ||||
| 	"code.gitea.io/gitea/modules/log" | ||||
| 	"code.gitea.io/gitea/modules/setting" | ||||
| 	"code.gitea.io/gitea/modules/web" | ||||
| 	"code.gitea.io/gitea/routers/api/packages/alpine" | ||||
| 	"code.gitea.io/gitea/routers/api/packages/cargo" | ||||
| 	"code.gitea.io/gitea/routers/api/packages/chef" | ||||
| 	"code.gitea.io/gitea/routers/api/packages/composer" | ||||
| @@ -107,6 +108,19 @@ func CommonRoutes(ctx gocontext.Context) *web.Route { | ||||
| 	}) | ||||
|  | ||||
| 	r.Group("/{username}", func() { | ||||
| 		r.Group("/alpine", func() { | ||||
| 			r.Get("/key", alpine.GetRepositoryKey) | ||||
| 			r.Group("/{branch}/{repository}", func() { | ||||
| 				r.Put("", reqPackageAccess(perm.AccessModeWrite), alpine.UploadPackageFile) | ||||
| 				r.Group("/{architecture}", func() { | ||||
| 					r.Get("/APKINDEX.tar.gz", alpine.GetRepositoryFile) | ||||
| 					r.Group("/{filename}", func() { | ||||
| 						r.Get("", alpine.DownloadPackageFile) | ||||
| 						r.Delete("", reqPackageAccess(perm.AccessModeWrite), alpine.DeletePackageFile) | ||||
| 					}) | ||||
| 				}) | ||||
| 			}) | ||||
| 		}, reqPackageAccess(perm.AccessModeRead)) | ||||
| 		r.Group("/cargo", func() { | ||||
| 			r.Group("/api/v1/crates", func() { | ||||
| 				r.Get("", cargo.SearchPackages) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user