25 lines
		
	
	
		
			731 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			731 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Automancer.Common;
 | |
| using Spectre.Console.Cli;
 | |
| 
 | |
| namespace Automancer.Command.Image;
 | |
| 
 | |
| public class Module : ICommandModuleWithRegistry
 | |
| {
 | |
|     public void Configure(IConfigurator config)
 | |
|     {
 | |
|         // No implementation needed here
 | |
|     }
 | |
|     public void Configure(IConfigurator config, CommandRegistry registry)
 | |
|     {
 | |
|         config.AddBranch("image", image => {
 | |
|             var description = "Docker/podman image operations";
 | |
|             image.SetDescription(description);
 | |
|             registry.Add("image", description);
 | |
| 
 | |
|             image.AddCommand<BuildCommand>("build").WithDescription("Build a docker image");
 | |
|             image.AddCommand<PushCommand>("push").WithDescription("Push a docker image");
 | |
| 
 | |
|         });
 | |
|     }
 | |
| 
 | |
| } |