Commit 29672eb
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments