Skip to content

rmeneely/update-yaml

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

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

update-yaml

This GitHub Action updates YAML file values

Usage

    - uses: rmeneely/update-yaml@v1
      with:
        # Infile. The YAML file to be read and updated
        # Default: 'values.yaml'
        # Optional
        infile: 'values.yaml
        # varlist - a comma separated list of variable values. e.g version=v1.2.3,image.tag=latest
        # Default: ''
        # Optional
        varlist: 'version=v1.2.3,image.tag=latest'

Examples

    # Sets image tag in values.yaml file
    # Example: 
    - uses: rmeneely/update-yaml@v1
      with:
        infile: values.yaml
        varlist: 'image.tag=v1.2.3'
    # Sets appVersion and version in Chart.yaml
    # Example: 
    - uses: rmeneely/update-yaml@v1
      with:
        infile: values.yaml
        varlist: appVersion=v1.2.3,version=4.5.6
    # Sets dependency version in Chart.yaml list of dependencies
    # Example: 
    - uses: rmeneely/update-yaml@v1
      with:
        infile: Chart.yaml
        varlist: dependencies[name=myapp].version=\"1.0.1\"

This will update the dependencies.version value to "1.0.1" where that same list item has dependencies.name set to 'myapp'.

Output

steps.update-yaml.outputs.updated - Set to 'true' or 'false'

License

The MIT License (MIT)

About

GitHub Action to update YAML file values

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages