You've already forked gitea-docker-registry-prune
							
							Allow multiple tags (remove safety check)
This commit is contained in:
		
							
								
								
									
										17
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								main.go
									
									
									
									
									
								
							@@ -87,17 +87,14 @@ func run(giteaUrl string, registryUrl string, giteaToken string) error {
 | 
				
			|||||||
					} else {
 | 
										} else {
 | 
				
			||||||
						toPurge = append(toPurge, org+"/"+pkg.Name+"/"+pkg.Version)
 | 
											toPurge = append(toPurge, org+"/"+pkg.Name+"/"+pkg.Version)
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				}
 | 
						// if !slices.Equal(images, toKeep) {
 | 
				
			||||||
			}
 | 
						// 	return fmt.Errorf("images from registry don't match with those to keep")
 | 
				
			||||||
		}
 | 
						// }
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	slices.Sort(images)
 | 
					 | 
				
			||||||
	slices.Sort(toKeep)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if !slices.Equal(images, toKeep) {
 | 
					 | 
				
			||||||
		return fmt.Errorf("images from registry don't match with those to keep")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for _, p := range toPurge {
 | 
						for _, p := range toPurge {
 | 
				
			||||||
		px := strings.Split(p, "/")
 | 
							px := strings.Split(p, "/")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user