@fensak-io/senc-schemastore-ciconfig
v0.0.7
Published
Type definitions for GitHub Actions configuration files derived from jsonschema definition.
Downloads
5
Readme
senc-schemastore-ciconfig
contains type definitions for various CI configurations so that you can generate CI
configuration files using senc.
Types
The type definitions are auto generated from jsonschema defintions provided by SchemaStore using the json-schema-to-typescript utility.
The base types to use for the workflow configuration files are as follows:
- Circle CI:
CircleCIConfig
- GitHub Actions:
GitHubActionsWorkflowConfig
Example usage
Check out how senc
uses this to maintain the CircleCI
configuration.
Caveat on sub types
There may be situations where you may want to use the sub type in your TypeScript file. Unfortunately, since the types
are auto generated, the sub types may be named oddly (e.g., the json schema for GitHub Actions workflow files contains
repeated names for sub objects, leading to duplicate types with numbers, like Types1
and Types2
in
github.d.ts).
Additionally, the types may not be as rich as you expect due to the dynamic nature of the json config (e.g., use of
patternAttributes
leads to very loose types).
For the best protection, it is recommended to validate the generated config with the raw json schema from SchemaStore.