fix: molecule-tests matrix runner-index renders as empty for 0
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user