Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
align-justify

GitHub Action

jsonnet-render

v1

jsonnet-render

align-justify

jsonnet-render

Executes jsonnet with provided args

Installation

Copy and paste the following snippet into your .yml file.

              

- name: jsonnet-render

uses: alexdglover/jsonnet-render@v1

Learn more about this action in alexdglover/jsonnet-render

Choose a version

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.

Output

This Action has no outputs.

Usage

Print to STDOUT

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

Render to file

steps:
  - id: jsonnet-render
    uses: alexdglover/jsonnet-render@v1
    with:
      file: path/to/file.jsonnet
      output_file: output/file.json

Render multiple files in a single directory

steps:
  - id: jsonnet-render
    uses: alexdglover/jsonnet-render@v1
    with:
      file: path/to/file.jsonnet
      output_dir: output/