Open ben-wilson-peak opened 1 year ago
I've filed this as a bug under this repository because the schema is located here, nor is this a support request. I'd like clarification on if it is intended to be supported and if so this should be considered a valid bug request. Much appreciated for any help!
Hey @ben-wilson-peak,
custom names are for primitive values, for example
os: [macos-latest, windows-latest, ubuntu-latest]
If you want array of objects you can use include
as shown below
matrix:
include:
- os: macos-latest
version: 12
environment: prod
- os: windows-latest
version: 16
- os: ubuntu-latest
version: 16
Hey @ben-wilson-peak,
custom names are for primitive values, for example
os: [macos-latest, windows-latest, ubuntu-latest]
If you want array of objects you can use
include
as shown belowmatrix: include: - os: macos-latest version: 12 environment: prod - os: windows-latest version: 16 - os: ubuntu-latest version: 16
Hi, the runner supports more than primitives in custom names, it's just the json spec which is suggesting otherwise. I'm using it right now, as are many others. The only problem is it's not documented, it shows up as invalid in the editor and in the long run we don't know that it's supported (which is silly since include
is just a merge).
I use this currently in json payloads to configure the matrix dynamically
Related: the matrix
context documentation says that all properties are string
-valued, which is even more restrictive than primitive values.
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.
π
Describe the bug The schema for validating actions is invalid for matrices. In the online editor it marks a job as invalid, but the runner understands the syntax and is arguably a completely valid and useful way to define the matrix
To Reproduce Steps to reproduce the behavior:
Matrix options must only contain primitive values
Expected behavior Linting should not highlight the matrix as invalid, the runner accepts it and is presumably supported syntax
Runner Version and Platform
N/A
What's not working?
See instructions
Job Log Output
N/A
Runner and Worker's Diagnostic Logs
N/A
Adding the term "Matrix options must only contain primitive values" as plain text so google can pick it up for indexing if others have the problem. You're welcome :D