force dry run via start arg
All checks were successful
Build on push / prepare (push) Successful in 20s
Build on push / build (push) Successful in 39s

This commit is contained in:
2026-02-15 12:17:45 +01:00
parent c1a882d1a2
commit 4497b67b70
3 changed files with 15 additions and 7 deletions

View File

@@ -37,6 +37,12 @@ public class Worker(
{
try
{
var dryRun = configuration["DRY_RUN"]?.ToLower() == "true";
if (dryRun)
{
logger.LogInformation("DRY RUN MODE ENABLED - No packages will be deleted");
}
// Parse comma-separated names
var names = (configuration["NAMES"] ?? "")
.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
@@ -60,12 +66,6 @@ public class Worker(
logger.LogInformation("Found {Count} packages to delete for name '{Name}'", packagesToDelete.Count,
name);
Console.WriteLine($"Found {packagesToDelete.Count} packages to delete for name '{name}':");
foreach (var pkg in packagesToDelete)
{
Console.WriteLine($"- {pkg.Name} {pkg.Version}");
}
// await DeletePackages(packagesToDelete, cancellationToken);
logger.LogInformation("Deleted {Count} packages for name '{Name}'", packagesToDelete.Count, name);