Skip to content

A collection of tools that help work with YAML in CI and GitHub Actions

License

Notifications You must be signed in to change notification settings

marccampbell/yaml-toolbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAML Toolbox

A collection of small YAML tools that can be used from the CLI or a GitHub Action

Splitter

Given a Kubernetes multi-doc YAML file, split the file into separate files.

The following GitHub Action workflow will split the contents of api.yaml into separate documents, in the api directory. The filenames will be [metadata.name]-[kind].yaml.

      - name: Split the api doc
        uses: marccampbell/yaml-toolbox/action/split@master
        with:
          path: ./api.yaml
          out: ./api

Remarshaler

Given a YAML document or a directory of YAML documents, unmarshal and remarshal to create deterministic YAML. This reorders the YAML document to be consistent, and thereby creates smaller diffs. It also (importantly) doesn't wrap lines at 80 chars, which is useful when using a template functions in YAML for tools such as KOTS or Helm.

The following GitHub Action workflow will remarshal all of the documetns in the kots directory:

      - name: Remarshal the release
        uses: marccampbell/yaml-toolbox/action/remarshal@master
        with:
          path: ./kots

About

A collection of tools that help work with YAML in CI and GitHub Actions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published