fix: omit ExtraSources when NODE_IMAGE_SOURCE is empty
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user