Skip to content

alexdglover/jsonnet-render

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

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