fix: accept []string and []int in matrix refs (#2956)

Co-authored-by: no-hup <shauryaj.finance@gmail.com>
This commit is contained in:
shaurya
2026-08-10 23:17:58 +05:30
committed by GitHub
parent d4fd591dd3
commit 85aca587b1
5 changed files with 87 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ vars:
OS_VAR: ["windows", "linux", "darwin"]
ARCH_VAR: ["amd64", "arm64"]
NOT_A_LIST: "not a list"
OS_CSV: "windows,linux,darwin"
tasks:
# Loop over a list of values
@@ -30,6 +31,16 @@ tasks:
ref: .ARCH_VAR
cmd: echo "{{.ITEM.OS}}/{{.ITEM.ARCH}}"
loop-matrix-ref-computed:
cmds:
- for:
matrix:
OS:
ref: 'splitList "," .OS_CSV'
ARCH:
ref: .ARCH_VAR
cmd: echo "{{.ITEM.OS}}/{{.ITEM.ARCH}}"
loop-matrix-ref-error:
cmds:
- for:

View File

@@ -0,0 +1,6 @@
windows/amd64
windows/arm64
linux/amd64
linux/arm64
darwin/amd64
darwin/arm64