fix: pass empty ExtraSources when NODE_IMAGE_SOURCE is unset
This commit is contained in:
@@ -107,7 +107,7 @@ jobs:
|
|||||||
$prefix = "${{ vars.REGISTRY_HOST }}/${{ vars.REGISTRY_OWNER }}".Trim()
|
$prefix = "${{ vars.REGISTRY_HOST }}/${{ vars.REGISTRY_OWNER }}".Trim()
|
||||||
$extra = '${{ vars.NODE_IMAGE_SOURCE }}'.Trim()
|
$extra = '${{ vars.NODE_IMAGE_SOURCE }}'.Trim()
|
||||||
if ($extra -like '*NODE_IMAGE_SOURCE*') { $extra = '' }
|
if ($extra -like '*NODE_IMAGE_SOURCE*') { $extra = '' }
|
||||||
powershell -NoProfile -ExecutionPolicy Bypass -File .\infrastructure\scripts\ci-resolve-node-image.ps1 -RegistryPrefix $prefix -ExtraSources $extra
|
powershell -NoProfile -ExecutionPolicy Bypass -File .\infrastructure\scripts\ci-resolve-node-image.ps1 -RegistryPrefix "$prefix" -ExtraSources "$extra"
|
||||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
- name: Build and push backend (tag only, not :latest)
|
- name: Build and push backend (tag only, not :latest)
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ jobs:
|
|||||||
$prefix = "${{ vars.REGISTRY_HOST }}/${{ vars.REGISTRY_OWNER }}".Trim()
|
$prefix = "${{ vars.REGISTRY_HOST }}/${{ vars.REGISTRY_OWNER }}".Trim()
|
||||||
$extra = '${{ vars.NODE_IMAGE_SOURCE }}'.Trim()
|
$extra = '${{ vars.NODE_IMAGE_SOURCE }}'.Trim()
|
||||||
if ($extra -like '*NODE_IMAGE_SOURCE*') { $extra = '' }
|
if ($extra -like '*NODE_IMAGE_SOURCE*') { $extra = '' }
|
||||||
powershell -NoProfile -ExecutionPolicy Bypass -File .\infrastructure\scripts\ci-resolve-node-image.ps1 -RegistryPrefix $prefix -ExtraSources $extra
|
powershell -NoProfile -ExecutionPolicy Bypass -File .\infrastructure\scripts\ci-resolve-node-image.ps1 -RegistryPrefix "$prefix" -ExtraSources "$extra"
|
||||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||||
|
|
||||||
- name: Build and push backend
|
- name: Build and push backend
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ param(
|
|||||||
[Parameter(Mandatory = $true)][string]$RegistryPrefix,
|
[Parameter(Mandatory = $true)][string]$RegistryPrefix,
|
||||||
[string]$OutFile = '.ci-node-image',
|
[string]$OutFile = '.ci-node-image',
|
||||||
[string]$HubImage = 'node:20-alpine',
|
[string]$HubImage = 'node:20-alpine',
|
||||||
|
[AllowEmptyString()]
|
||||||
[string]$ExtraSources = ''
|
[string]$ExtraSources = ''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user