fix: omit ExtraSources when NODE_IMAGE_SOURCE is empty
All checks were successful
Production — tag build, push, deploy / build-and-push (push) Successful in 5m17s
Production — tag build, push, deploy / deploy (push) Successful in 13m34s

This commit is contained in:
2026-09-05 20:18:06 +03:30
parent feafc3a219
commit 6c7e0574b9
2 changed files with 8 additions and 2 deletions

View File

@@ -107,7 +107,10 @@ jobs:
$prefix = "${{ vars.REGISTRY_HOST }}/${{ vars.REGISTRY_OWNER }}".Trim()
$extra = '${{ vars.NODE_IMAGE_SOURCE }}'.Trim()
if ($extra -like '*NODE_IMAGE_SOURCE*') { $extra = '' }
powershell -NoProfile -ExecutionPolicy Bypass -File .\infrastructure\scripts\ci-resolve-node-image.ps1 -RegistryPrefix "$prefix" -ExtraSources "$extra"
# Do not nest powershell -File: empty -ExtraSources "$extra" is dropped and PS5.1 errors MissingArgument.
$scriptArgs = @{ RegistryPrefix = $prefix }
if (-not [string]::IsNullOrWhiteSpace($extra)) { $scriptArgs['ExtraSources'] = $extra }
& .\infrastructure\scripts\ci-resolve-node-image.ps1 @scriptArgs
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Build and push backend (tag only, not :latest)

View File

@@ -92,7 +92,10 @@ jobs:
$prefix = "${{ vars.REGISTRY_HOST }}/${{ vars.REGISTRY_OWNER }}".Trim()
$extra = '${{ vars.NODE_IMAGE_SOURCE }}'.Trim()
if ($extra -like '*NODE_IMAGE_SOURCE*') { $extra = '' }
powershell -NoProfile -ExecutionPolicy Bypass -File .\infrastructure\scripts\ci-resolve-node-image.ps1 -RegistryPrefix "$prefix" -ExtraSources "$extra"
# Do not nest powershell -File: empty -ExtraSources "$extra" is dropped and PS5.1 errors MissingArgument.
$scriptArgs = @{ RegistryPrefix = $prefix }
if (-not [string]::IsNullOrWhiteSpace($extra)) { $scriptArgs['ExtraSources'] = $extra }
& .\infrastructure\scripts\ci-resolve-node-image.ps1 @scriptArgs
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Build and push backend