fix(ci): conditional --commit splat on main
Propagates the PS5.1 empty-arg-drop fix (runner fetches action @main). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -299,12 +299,14 @@ runs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Build argument list for the Python CLI. Long-form kebab-case flags only.
|
# Build argument list for the Python CLI. Long-form kebab-case flags only.
|
||||||
|
# NOTE: never put an empty string in the splatted array — PowerShell
|
||||||
|
# 5.1 drops zero-length args when calling a native exe, which would
|
||||||
|
# shift the flag/value pairing. Add optional args conditionally.
|
||||||
$pyArgs = @(
|
$pyArgs = @(
|
||||||
'-m', 'ci_orchestrator', 'job',
|
'-m', 'ci_orchestrator', 'job',
|
||||||
'--job-id', $jobId,
|
'--job-id', $jobId,
|
||||||
'--repo-url', $repoUrl,
|
'--repo-url', $repoUrl,
|
||||||
'--branch', $repoBranch,
|
'--branch', $repoBranch,
|
||||||
'--commit', $repoCommit,
|
|
||||||
'--build-command', $env:INPUT_BUILD_COMMAND,
|
'--build-command', $env:INPUT_BUILD_COMMAND,
|
||||||
'--guest-artifact-source', $env:INPUT_ARTIFACT_SOURCE,
|
'--guest-artifact-source', $env:INPUT_ARTIFACT_SOURCE,
|
||||||
'--guest-os', $resolvedGuestOS,
|
'--guest-os', $resolvedGuestOS,
|
||||||
@@ -312,6 +314,7 @@ runs:
|
|||||||
'--template-path', $resolvedTemplatePath,
|
'--template-path', $resolvedTemplatePath,
|
||||||
'--snapshot-name', $resolvedSnapshotName
|
'--snapshot-name', $resolvedSnapshotName
|
||||||
)
|
)
|
||||||
|
if ($repoCommit) { $pyArgs += @('--commit', $repoCommit) }
|
||||||
|
|
||||||
# Submodules and transport default to ON; pass the explicit
|
# Submodules and transport default to ON; pass the explicit
|
||||||
# negative flag when the caller opted out so the Python default
|
# negative flag when the caller opted out so the Python default
|
||||||
|
|||||||
Reference in New Issue
Block a user