Skip to content

Commit 29672eb

Browse files
aholstrup1Copilot
andauthored
Fix markstale.ps1 Digests parameter type from string to string[] (#601)
## Problem The `MarkOldImagesStale` job in the "Build new images" workflow is failing ([run #695](https://github.com/microsoft/nav-docker/actions/runs/24763865306/job/72462802665)). The `$Digests` parameter in `markstale.ps1` is declared as `[string]`, but both callers pass an array: - `BuildMissingImages.yaml`: `$digests = $env:digestsJson | ConvertFrom-Json` (produces `string[]`) - `MarkStale.yaml`: `$digests = "$env:digests".Split(",").Trim() | Select-Object -Unique` (produces `string[]`) PowerShell coerces the array into a single space-joined string (e.g. `"sha256:abc sha256:def"`), so the `foreach` loop iterates once with a malformed digest, causing `oras attach` to fail. ## Fix Change the parameter type from `[string]` to `[string[]]` so the array is preserved and each digest is processed individually. Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ce62635 commit 29672eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build/markstale.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
param(
22
[Parameter(Mandatory = $true)]
3-
[string]$Digests, # $digests = $env:digestsJson | ConvertFrom-Json
3+
[string[]]$Digests, # $digests = $env:digestsJson | ConvertFrom-Json
44
[Parameter(Mandatory = $false)]
55
[string]$PushRegistry = "mcrbusinesscentral.azurecr.io"
66
)

0 commit comments

Comments
 (0)