Skip to content

A tool that will update helm charts in a given repository

License

Notifications You must be signed in to change notification settings

shini4i/helm-charts-updater

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

Repository files navigation

helm-charts-updater

A tool that will update helm charts in a given repository

GitHub last commit (branch) GitHub release (latest SemVer) GitHub

Project Description

Warning

Currently, only patch version bump is supported for chart version.

The use case is relatively niche. The idea is that there are a lot of helm charts in a single git repository, and it is required to bump both chart version and appVersion from a pipeline in a different repository.

So it is required that the selected helm chart uses appVersion as an image tag.

Additionally, it can generate helm readme and generate table of the existing charts in the main README.md file.

It might be a good tandem for the chart-releaser-action.

Example Workflow

- name: Update helm chart
  uses: shini4i/helm-charts-updater@v1
  with:
    github_token: ${{ secrets.GH_TOKEN }}
    gh_user: shini4i
    gh_repo: charts
    chart_name: my-chart
    app_version: ${{ github.ref_name }}

    # Optional. The path to clone the git repository
    # Defaults to charts-repo
    clone_path: charts-repo

    # Optional. Path to the location of helm charts in the gh_repo
    # Default to charts
    charts_path: charts

    # Optional. Git user.name
    # Defaults to github-actions[bot]
    commit_author: github-actions[bot]

    # Optional. Git user.email
    # Defaults to github-actions[bot]@users.noreply.github.com
    commit_email: github-actions[bot]@users.noreply.github.com

    # Optional. Whether helm docs should be generated for the selected chart.
    # Defaults to true
    generate_docs: true

    # Optional. Whether the README should be updated with the table of existing charts.
    # Defaults to false
    # NOTE: It is required to have the following comments in the README.md file:
    # <!-- table_start -->
    # <!-- table_end -->
    # The table would be generated between those two comments.
    update_readme: true

    # Optional. Whether the chart annotation should be updated.
    # Defaults to false
    # If will update the chart annotation with the updated appVersion
    # to generate changelog on the artifact hub.
    update_chart_annotations: true