vladimirsitnikov
02/06/2023, 5:05 AMPiotr Krzemiński
02/06/2023, 6:17 AMvladimirsitnikov
02/06/2023, 9:18 AMaction.yml
, so action authors can specify types of arguments and the encoding options (e.g. list delimited by ,
)
I see you’ve invented your own action-types.yml
in github-actions-typing. However, I would like to stick with https://json-schema.org/ instead.
For instance, there’s JSON schema for action.yml
itself, so IDEs (e.g. IntelliJ IDEA) can autocomplete action.yml
values: https://github.com/SchemaStore/schemastore/blob/35f210a155273520e48fdb48fa64c1fb5df2c5ae/src/schemas/json/github-workflow.json
So I am inclined that adopting json schema for action-types.yml
(and for placing types in action.yml
for GitHub-native) would be superior than a custom action-types.yml
Piotr Krzemiński
02/06/2023, 9:20 AMaction.yml
. However, since the typing solution a third-party tool, I don’t want to “extend” the original manifest. See a discussion here: https://github.com/krzema12/github-workflows-kt/issues/302#issuecomment-1162752831 - it was a driver for creating action-types.yml
action-types.yml
files: https://github.com/krzema12/github-actions-typing/issues/82, so that it’s easier to edit thesevladimirsitnikov
02/06/2023, 10:33 AMtype: string
In other words, currently action-types.yml
uses its own language for declaring types. However, it would be better if type:
attribute contained JSON schema value.
for instance, type: array, items: …
(JSON schema) instead of type: list
(github-actions-typing custom dsl)Piotr Krzemiński
02/06/2023, 10:33 AMaction.yml
? action.yml
is not a valid JSON schema file, so from what I understand, it would only get inspiration of how types are defined in JSON schema, not being a functional schema, right?vladimirsitnikov
02/06/2023, 1:12 PMinputs:
distribution:
type: enum
allowed-values:
- Alpine
- Debian
- kali-linux
- openSUSE-Leap-15.2
- Ubuntu-22.04
- Ubuntu-20.04
- Ubuntu-18.04
- Ubuntu-16.04
=>
inputs:
distribution:
enum:
- Alpine
- Debian
- kali-linux
- openSUSE-Leap-15.2
- Ubuntu-22.04
- Ubuntu-20.04
- Ubuntu-18.04
- Ubuntu-16.04
additional-packages:
type: list
separator: ' '
list-item:
type: string
=>
additional-packages:
type: array
separator: ' ' # this is extension to json schema, so I'm not sure here to put it
items:
type: string
Piotr Krzemiński
02/06/2023, 8:34 PMvladimirsitnikov
02/07/2023, 3:44 AMPiotr Krzemiński
02/07/2023, 5:17 AMvladimirsitnikov
02/07/2023, 5:30 AMPiotr Krzemiński
02/07/2023, 10:37 AM