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:
Simone
2026-05-17 17:39:37 +02:00
parent 61cb6cdb40
commit 02ea7e61ec
+4 -1
View File
@@ -299,12 +299,14 @@ runs:
}
# 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 = @(
'-m', 'ci_orchestrator', 'job',
'--job-id', $jobId,
'--repo-url', $repoUrl,
'--branch', $repoBranch,
'--commit', $repoCommit,
'--build-command', $env:INPUT_BUILD_COMMAND,
'--guest-artifact-source', $env:INPUT_ARTIFACT_SOURCE,
'--guest-os', $resolvedGuestOS,
@@ -312,6 +314,7 @@ runs:
'--template-path', $resolvedTemplatePath,
'--snapshot-name', $resolvedSnapshotName
)
if ($repoCommit) { $pyArgs += @('--commit', $repoCommit) }
# Submodules and transport default to ON; pass the explicit
# negative flag when the caller opted out so the Python default