Skip to content

loc-tax/jsonnet-render

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonnet-render

Latest Release Examples

A GitHub action for executing Jsonnet. Typical usage will be to render Jsonnet files and combine them with another GitHub action to:

  • post the rendered result as a comment on a PR
  • create a pull request or new commit with the rendered files

Inputs

  • file - specifies the Jsonnet file to be rendered. REQUIRED
  • output_file - when set, writes the STDOUT from Jsonnet invocation to $output-file. OPTIONAL
  • output_dir - when set, appends -m $output_dir to the Jsonnet invocation to render multiple output files to a single directory. OPTIONAL
  • plaintext - when set to any value, Jsonnet is invoked with the -S flag to emit plaintext rather than JSON-encoded output.
  • params - specify external --ext-str arguments. dryrun=true env=prod becomes --ext-str dryrun=true --ext-str env=prod. Use either of comma, space or semicolon as argument separator. OPTIONAL

Output

This Action has no outputs.

Usage

Print to STDOUT

steps:
  - id: jsonnet-render
    uses: alexdglover/jsonnet-render@v2
    with:
      file: path/to/file.jsonnet

Render to file

steps:
  - id: jsonnet-render
    uses: alexdglover/jsonnet-render@v2
    with:
      file: path/to/file.jsonnet
      output_file: output/file.json
      params: dryrun=true env=prod

Render multiple files in a single directory

steps:
  - id: jsonnet-render
    uses: alexdglover/jsonnet-render@v2
    with:
      file: path/to/file.jsonnet
      output_dir: output/
      params: dryrun=true;env=prod

About

A GitHub action for executing Jsonnet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 74.0%
  • Dockerfile 16.3%
  • Jsonnet 9.7%