fix: molecule-tests matrix runner-index renders as empty for 0

This commit is contained in:
2026-06-22 02:15:06 +00:00
parent 69089f6d2c
commit 8c16703106
3 changed files with 17 additions and 10 deletions
+8 -3
View File
@@ -111,9 +111,14 @@ def get_runner_count(api_url: str, token: str, owner: str, repo: str) -> int:
return DEFAULT_MAX_RUNNERS
def generate_indices(count: int) -> list[int]:
"""Generate a list of runner indices [0, 1, ..., count-1]."""
return list(range(count))
def generate_indices(count: int) -> list[str]:
"""Generate a list of runner indices ["0", "1", ..., "N-1"].
Uses strings instead of ints because Gitea Actions renders
integer 0 as empty in ${{ matrix.runner-index }} expressions,
causing --runner-index to be passed without a value.
"""
return [str(i) for i in range(count)]
@click.command()